public String apply ( final String word , final String postag ) { String lemma = null ; final List < String > keys = this . getDictKeys ( word , postag ) ; // lookup lemma as value of the map final String keyValue = this . dictMap . get ( keys ) ; if ( keyValue != null ) { lemma = keyValue ; } else { lemma = "O" ; } return lemma ; }
Lookup lemma in a dictionary . Outputs O if not found .