import org.apache.uima.jcas.JCas;
public class ConceptTaggingProcessor implements AlchemyOutputProcessor {
public void process(JCas cas, Results results) throws Exception {
ConceptResults conceptResults = (ConceptResults) results;
if (conceptResults.getConcepts() != null) {
List<Concept> concepts = conceptResults.getConcepts().getConcepts();
for (Concept concept : concepts) {
ConceptFS conceptFS = new ConceptFS(cas);
Type type = conceptFS.getType();
conceptFS.setFeatureValueFromString(type.getFeatureByBaseName("text"), concept.getText());
conceptFS.setFeatureValueFromString(type.getFeatureByBaseName("relevance"), concept