Package org.apache.solr.uima.ts

Examples of org.apache.solr.uima.ts.SentimentAnnotation.addToIndexes()


      String tokenPOS = ((TokenAnnotation) annotation).getPosTag();
      if ("jj".equals(tokenPOS)) {
        if (Arrays.asList(positiveAdj).contains(annotation.getCoveredText())) {
          SentimentAnnotation sentimentAnnotation = createSentimentAnnotation(jcas, annotation);
          sentimentAnnotation.setMood("positive");
          sentimentAnnotation.addToIndexes();
        }
        else if (Arrays.asList(negativeAdj).contains(annotation.getCoveredText())) {
          SentimentAnnotation sentimentAnnotation = createSentimentAnnotation(jcas, annotation);
          sentimentAnnotation.setMood("negative");
          sentimentAnnotation.addToIndexes();
View Full Code Here


          sentimentAnnotation.addToIndexes();
        }
        else if (Arrays.asList(negativeAdj).contains(annotation.getCoveredText())) {
          SentimentAnnotation sentimentAnnotation = createSentimentAnnotation(jcas, annotation);
          sentimentAnnotation.setMood("negative");
          sentimentAnnotation.addToIndexes();
        }
      }
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.