Examples of addFsToIndexes()


Examples of org.apache.uima.cas.CAS.addFsToIndexes()

    cas.setDocumentText("This is the default view.");
    CAS newView = cas.createView(NEW_VIEW);
    newView.setDocumentText("This is a new view.");
    Type type = cas.getTypeSystem().getType(TEST_TYPE);
    AnnotationFS createAnnotation = newView.createAnnotation(type, 10, 13);
    newView.addFsToIndexes(createAnnotation);

    ae.process(cas);

    cas.reset();
    FileInputStream stream = new FileInputStream(xmiOutputFile);
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

    CAS cas = ae.newCAS();
    cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));
   
    Type typeCW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.CW");
    Type typeSW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.SW");
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 0, 5));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 7, 13));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 15, 18));
    cas.addFsToIndexes(cas.createAnnotation(typeSW, 19, 22));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 23, 28));
   
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

    cas.setDocumentText(FileUtils.file2String(textFile, "UTF-8"));
   
    Type typeCW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.CW");
    Type typeSW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.SW");
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 0, 5));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 7, 13));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 15, 18));
    cas.addFsToIndexes(cas.createAnnotation(typeSW, 19, 22));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 23, 28));
   
    ae.process(cas);
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

   
    Type typeCW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.CW");
    Type typeSW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.SW");
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 0, 5));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 7, 13));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 15, 18));
    cas.addFsToIndexes(cas.createAnnotation(typeSW, 19, 22));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 23, 28));
   
    ae.process(cas);
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

    Type typeCW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.CW");
    Type typeSW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.SW");
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 0, 5));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 7, 13));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 15, 18));
    cas.addFsToIndexes(cas.createAnnotation(typeSW, 19, 22));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 23, 28));
   
    ae.process(cas);

    Type t = null;
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

    Type typeSW = cas.getTypeSystem().getType("org.apache.uima.ruta.type.SW");
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 0, 5));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 7, 13));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 15, 18));
    cas.addFsToIndexes(cas.createAnnotation(typeSW, 19, 22));
    cas.addFsToIndexes(cas.createAnnotation(typeCW, 23, 28));
   
    ae.process(cas);

    Type t = null;
    AnnotationIndex<AnnotationFS> ai = null;
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

      CAS cas = ae.newCAS();
      cas.reset();
      cas.setDocumentText(htmlContent);
      Type boldType = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "B");
      AnnotationFS fs = cas.createAnnotation(boldType, 78, 89);
      cas.addFsToIndexes(fs);

      // go:
      ae.process(cas);

      // test:
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

    cas.reset();
    cas.setDocumentText(htmlDecodingAnnotations);
    Type boldType = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "B");
    AnnotationFS fs1 = cas.createAnnotation(boldType, 210, 221);
    AnnotationFS fs2 = cas.createAnnotation(boldType, 279, 290);
    cas.addFsToIndexes(fs1);
    cas.addFsToIndexes(fs2);

    // go:
    ae.process(cas);
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

    cas.setDocumentText(htmlDecodingAnnotations);
    Type boldType = cas.getTypeSystem().getType(HtmlAnnotator.NAMESPACE + "B");
    AnnotationFS fs1 = cas.createAnnotation(boldType, 210, 221);
    AnnotationFS fs2 = cas.createAnnotation(boldType, 279, 290);
    cas.addFsToIndexes(fs1);
    cas.addFsToIndexes(fs2);

    // go:
    ae.process(cas);

    // test: should be:
View Full Code Here

Examples of org.apache.uima.cas.CAS.addFsToIndexes()

   
    Type type1 = cas.getTypeSystem().getType("org.apache.uima.SubAtomic1");
    Type type2 = cas.getTypeSystem().getType("org.apache.uima.SubAtomic2");
    AnnotationFS a1 = cas.createAnnotation(type1, 7, 10);
    AnnotationFS a2 = cas.createAnnotation(type2, 10, 13);
    cas.addFsToIndexes(a1);
    cas.addFsToIndexes(a2);
   
    try {
      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name
              + ".txt", 50, false, false, complexTypes, null, null, cas);
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.