Skip to content

Commit

Permalink
Updates the conversion from semsimian output to the TermSetPairwiseSi…
Browse files Browse the repository at this point in the history
…milairty shape to include all subject_termset and object_termset members (#379)
  • Loading branch information
kevinschaper authored Oct 10, 2023
1 parent b4a1e74 commit 25ee249
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/src/monarch_py/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ def compare(self, subjects, objects):
converted_data = {
**data,
**{
'subject_termset': data['subject_termset'][0],
'object_termset': data['object_termset'][0],
# flatten the nested termset dicts
'subject_termset': {k: v for d in data['subject_termset'] for k, v in d.items()},
'object_termset': {k: v for d in data['object_termset'] for k, v in d.items()},
'subject_best_matches': {
k: {**v, 'similarity': subject_best_matches_similarity_map[k]}
for k, v in data['subject_best_matches'].items()
Expand Down

0 comments on commit 25ee249

Please sign in to comment.