/** * This process(JCas) method cycles through all annotations in the CAS. For * those that are identified as tokens by {@link AnnotationDataExtractor} * implementation being used, an attempt is made to extract part-of-speech * information. The covered text for each token is then lemmatized using the * {@link BioLemmatizer}, using the part-of-speech information if it was * available. */ @Override public void process(JCas jCas) throws AnalysisEngineProcessException { for (Token t : JCasUtil.select(jCas, Token.class)) { String pos = BlueCasUtil.getSinglePosTag(t); String lemma = lemmatize(t.getCoveredText(), pos); if (lemma != null) t.setLemmaStr(lemma); } }