cogcomp-nlp
cogcomp-nlp copied to clipboard
Minor improvement to POSAnnotator
Looking at code to try to understand how to use POSAnnotator I see an opportunity for a minor improvement. In https://github.com/CogComp/cogcomp-nlp/blob/49f226331c203ba3ff4f20b51a1a4c97bce999b7/pos/src/main/java/edu/illinois/cs/cogcomp/pos/POSAnnotator.java#L94 and line 97 the code seems to be doing the same operation tagger.discreteValue(lbjtoken)
. Perhaps the value can be saved the first time and reused in line 97.