Examples of addToIndexes()


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

        entityAnnotation.setEntity(entityString);
        String name = "OTHER"; // "OTHER" makes no sense. In practice, "PERSON", "COUNTRY", "E-MAIL", etc.
        if(entityString.equals("Apache"))
          name = "ORGANIZATION";
        entityAnnotation.setName(name);
        entityAnnotation.addToIndexes();
      }
    }
  }

}
View Full Code Here

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

Examples of org.apache.uima.alchemy.ts.concept.ConceptFS.addToIndexes()

                .getCrunchbase());
        conceptFS.setFeatureValueFromString(type.getFeatureByBaseName("semanticCrunchbase"),
                concept.getSemanticCrunchbase());
        conceptFS.setFeatureValueFromString(type.getFeatureByBaseName("musicBrainz"), concept
                .getMusicBrainz());
        conceptFS.addToIndexes();
      }
    }
  }

}
View Full Code Here

Examples of org.apache.uima.alchemy.ts.entity.AlchemyAnnotation.addToIndexes()

    if (annotationStart > 0) {
      // create annotation
      AlchemyAnnotation alchemyAnnotation = new AlchemyAnnotation(cas, annotationStart, annotationStart + entityText
              .length());
      alchemyAnnotation.setAlchemyType(type.toString());
      alchemyAnnotation.addToIndexes();
      UIMAFramework.getLogger().log(Level.INFO, new StringBuilder("added AlchemyAnnotation for ").append(alchemyAnnotation.getCoveredText()).append(" of type ").append(type.toString()).toString());
      // update entity occurrences
      NonEmptyFSList list = (NonEmptyFSList) fs.getOccurrences();
      if (list != null) {
        NonEmptyFSList newTail = new NonEmptyFSList(cas);
View Full Code Here

Examples of org.apache.uima.alchemy.ts.keywords.KeywordFS.addToIndexes()

    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

Examples of org.apache.uima.alchemy.ts.language.LanguageFS.addToIndexes()

            languageDetectionResults.getEthnologue());
    languageFS.setFeatureValueFromString(type.getFeatureByBaseName("nativeSpeakers"),
            languageDetectionResults.getNativeSpeakers());
    languageFS.setFeatureValueFromString(type.getFeatureByBaseName("wikipedia"),
            languageDetectionResults.getWikipedia());
    languageFS.addToIndexes();
  }

}
View Full Code Here

Examples of org.apache.uima.alchemy.ts.microformats.MicroformatFS.addToIndexes()

      Type type = microformatFS.getType();
      microformatFS.setFeatureValueFromString(type.getFeatureByBaseName("fieldName"), microformat
              .getFieldName());
      microformatFS.setFeatureValueFromString(type.getFeatureByBaseName("fieldData"), microformat
              .getFieldData());
      microformatFS.addToIndexes();
    }
  }

}
View Full Code Here

Examples of org.apache.uima.alchemy.ts.sentiment.SentimentFS.addToIndexes()

    DocumentSentiment docSentiment = ((SentimentAnalysisResults) results).getDocSentiment();
    if (docSentiment != null) {
      SentimentFS sentimentFS = new SentimentFS(cas);
      sentimentFS.setScore(docSentiment.getScore());
      sentimentFS.setSentimentType(docSentiment.getType());
      sentimentFS.addToIndexes();
    }
  }

}
View Full Code Here

Examples of org.apache.uima.ducc.Workitem.addToIndexes()

      if (null != mLanguage) {
        wi.setLanguage(mLanguage);
      }
      wi.setSendToLast(mSendToLast);
      wi.setSendToAll(mSendToAll);
      wi.addToIndexes();
      wi.setLastBlock(mWorkList.get(mCurrentIndex).last);
      logger.log(Level.INFO, "Sending "+wi.getInputspec()+" index="+wi.getBlockindex()+" last="+wi.getLastBlock()+" length="+wi.getBytelength());
      mCurrentIndex++;
      jcas.setDocumentText(wi.getInputspec()+" index="+wi.getBlockindex()+" length="+wi.getBytelength());
    } catch (CASException e) {
View Full Code Here

Examples of org.apache.uima.ducc.sampleapps.DuccDocumentInfo.addToIndexes()

    DuccDocumentInfo di = new DuccDocumentInfo(newcas);
    di.setInputfile(inputFileName);
    di.setOutputfile(outputFileName);
    di.setDocseq(docInWI++);
    di.setByteoffset(wi.getBlockindex() * wi.getBlocksize() + nextDocOffset);
    di.addToIndexes();
    return newcas;
  }

  @Override
  public void process(JCas jcas) throws AnalysisEngineProcessException {
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.