Skip to content

Commit

Permalink
Merge pull request #163 from ontologyportal/Thompson_2025_02_17
Browse files Browse the repository at this point in the history
Fixed error in WordNet.getSynsetsFromWord, to accurately pre-pend the correct wordsense prefix
  • Loading branch information
apease authored Feb 17, 2025
2 parents c89cc75 + cd53e39 commit e90abfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/java/com/articulate/sigma/wordNet/WordNet.java
Original file line number Diff line number Diff line change
Expand Up @@ -2197,13 +2197,13 @@ public Set<String> getSynsetsFromWord(String word) {
result.addAll(prependPOS(nouns,"1"));
Set<String> verbs = verbSynsetHash.get(word);
if (verbs != null)
result.addAll(prependPOS(verbs,"1"));
result.addAll(prependPOS(verbs,"2"));
Set<String> adj = adjectiveSynsetHash.get(word);
if (adj != null)
result.addAll(prependPOS(adj,"1"));
result.addAll(prependPOS(adj,"3"));
Set<String> adv = adverbSynsetHash.get(word);
if (adv != null)
result.addAll(prependPOS(adv,"1"));
result.addAll(prependPOS(adv,"4"));
if (!result.isEmpty() && getSenseKeysFromWord(word).keySet().isEmpty())
System.err.println("Error in WordNet.getSynsetsFromWord(): synset but no sense key for word: " + word);
return result;
Expand Down

0 comments on commit e90abfd

Please sign in to comment.