// Convert CAS data into structures usable by ClearNLP
for (int i = 0; i < tokens.size(); i++) {
BaseToken token = tokens.get(i);
String lemma = useLemmatizer ? lemmatizer.getLemma(token.getCoveredText(), token.getPartOfSpeech()) : token.getNormalizedForm();
DEPNode node = new DEPNode(i+1, token.getCoveredText(), lemma, token.getPartOfSpeech(), new DEPFeat());
tree.add(node);
}
// Run parser and convert output back to CAS friendly data types
parser.process(tree);