Package org.apache.uima.alchemy.ts.keywords

Examples of org.apache.uima.alchemy.ts.keywords.KeywordFS


public class KeywordProcessor implements AlchemyOutputProcessor {

  public void process(JCas cas, Results results) throws Exception {
    for (Keyword k : ((KeywordResults) results).getKeywords()) {
      try {
        KeywordFS fs = new KeywordFS(cas);
        Type type = fs.getType();
        fs.setFeatureValueFromString(type.getFeatureByBaseName("text"), k.getText()); // text
        fs.addToIndexes();
      } catch (Exception e) {
        throw new MappingException(e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.alchemy.ts.keywords.KeywordFS

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.