mawiesne commented on code in PR #194: URL: https://github.com/apache/opennlp-sandbox/pull/194#discussion_r1877940064
########## opennlp-wsd/src/main/java/opennlp/tools/disambiguator/AbstractWSDisambiguator.java: ########## @@ -140,14 +126,65 @@ public List<String> disambiguate(String[] tokenizedContext, } } } - return senses; } /** - * @param sample - * @return result as an array of WordNet IDs + * Conducts disambiguation via available {@link Synset synsets} for the specified + * {@code wordTag}. + * + * @param wordTag A combination of word and POS tag, separated by a {@code .} character. + * @return The disambiguated sense and key if disambiguation was successful, + * {@code null} otherwise. */ - public abstract String disambiguate(WSDSample sample); + protected String disambiguate(String wordTag) { + + String[] splitWordTag = SPLIT.split(wordTag); + + String word = splitWordTag[0]; Review Comment: This part can be improved in a follow-up PR as in opennl-tools exists a class WordTag which handles that better as in this CnP variant. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@opennlp.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org