Skip to content

Commit

Permalink
Don't match to MHC items if similarity is too low #8
Browse files Browse the repository at this point in the history
Remove empty items from MHC #7
Ignore rubbish in MHC data
  • Loading branch information
woodthom2 committed Dec 18, 2023
1 parent 46e2efd commit fdb727c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/harmony/matching/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ def match_instruments_with_function(
ctrs[all_questions[idx].instrument_id] = Counter()
for topic in mhc_all_metadatas[a]["topics"]:
ctrs[all_questions[idx].instrument_id][topic] += 1
qt = mhc_questions[a].question_text
if qt is None or len(qt) < 3: # Ignore empty entries in MHC questionnaires
continue
all_questions[idx].nearest_match_from_mhc_auto = mhc_questions[a].dict()

instrument_to_category = {}
Expand Down

0 comments on commit fdb727c

Please sign in to comment.