Skip to content

Commit

Permalink
Merge pull request inspirehep#4315 from MJedr/improve-fuzzy-matching
Browse files Browse the repository at this point in the history
fuzzy matching: change request payload
  • Loading branch information
MJedr authored Sep 25, 2023
2 parents 043b813 + 801a6ef commit 1831786
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion inspirehep/modules/workflows/tasks/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,22 @@ def fuzzy_match(obj, eng):
``False`` otherwise.
"""
fuzzy_matching_data_keys = [
'abstracts',
'authors',
'titles',
'report_numbers',
'arxiv_eprints'
]
fuzzy_match_data = {key: val for key, val in obj.data.iteritems() if key in fuzzy_matching_data_keys}
matching_response = requests.get(
"{inspirehep_url}/matcher/fuzzy-match".format(
inspirehep_url=current_app.config["INSPIREHEP_URL"]
),
headers=_get_headers_for_hep_root_table_request(),
data=json.dumps(
{
"data": obj.data,
"data": fuzzy_match_data,
}
),
)
Expand Down

0 comments on commit 1831786

Please sign in to comment.