Skip to content

Commit

Permalink
Fixed error in MMI treecode output
Browse files Browse the repository at this point in the history
Changed treecode lookup to use concept preferred name instead of
synonym.
  • Loading branch information
willjrogers committed Apr 5, 2020
1 parent a164b03 commit d6716b2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,9 @@ public List<TermFrequency> entityToTermFrequencyInfo(List<Entity> entityList) {
entity.isNegated() ? 1 : 0, // neg?
posInfo);
tupleSet.add(tuple);
String preferredName = ev.getConceptInfo().getPreferredName();
termFreqMap.put(tfKey,
new TermFrequency(ev.getConceptInfo().getPreferredName(),
new TermFrequency(preferredName,
new ArrayList<String>(ev.getConceptInfo().getSemanticTypeSet()),
tupleSet,
entity.getFieldId() == null ? false :
Expand All @@ -447,7 +448,7 @@ public List<TermFrequency> entityToTermFrequencyInfo(List<Entity> entityList) {
cui,
1,
ev.getScore(),
getTreecodes(conceptString)));
getTreecodes(preferredName)));
}
}
}
Expand Down

0 comments on commit d6716b2

Please sign in to comment.