@Override public void process(final JCas aJCas) throws AnalysisEngineProcessException { for (Token token : select(aJCas, Token.class)) { final String coveredText = token.getText(); DecompoundedWord result; result = ranker.highestRank(splitter.split(coveredText)); if (!result.isCompound()) { continue; } final int beginIndex = token.getBegin(); final Compound compound = new Compound(aJCas, beginIndex, token.getEnd()); indexSplits(aJCas, result.getSplits(), beginIndex, token.getEnd(), null, compound); compound.addToIndexes(); } }