Package org.apache.uima.fit.type

Examples of org.apache.uima.fit.type.Token.addToIndexes()


    // analysis engine.
    AnalysisEngine desc = createEngine(IndexTestComponent.class);
    JCas jcas = desc.newJCas();

    Token token1 = new Token(jcas, 1, 2);
    token1.addToIndexes();

    // index1 is a sorted index, so when adding a token twice, both remain in the index
    Token token2 = new Token(jcas, 3, 4);
    token2.addToIndexes();
    token2.addToIndexes();
View Full Code Here


    Token token1 = new Token(jcas, 1, 2);
    token1.addToIndexes();

    // index1 is a sorted index, so when adding a token twice, both remain in the index
    Token token2 = new Token(jcas, 3, 4);
    token2.addToIndexes();
    token2.addToIndexes();

    Sentence sentence1 = new Sentence(jcas, 1, 2);
    sentence1.addToIndexes();
View Full Code Here

    token1.addToIndexes();

    // index1 is a sorted index, so when adding a token twice, both remain in the index
    Token token2 = new Token(jcas, 3, 4);
    token2.addToIndexes();
    token2.addToIndexes();

    Sentence sentence1 = new Sentence(jcas, 1, 2);
    sentence1.addToIndexes();

    // index2 is a set index, so even when adding a sentence twice, only one remains in the index
View Full Code Here

        throw new AnalysisEngineProcessException(e);
      }

      view.setDocumentText("some text");
      Token token = new Token(view, 0, 4);
      token.addToIndexes();
    }

  }

  public static class SofaUnawareAnnotator extends JCasAnnotator_ImplBase {
View Full Code Here

    @Override
    public void process(JCas jCas) throws AnalysisEngineProcessException {
      jCas.setDocumentText("some text");
      Token token = new Token(jCas, 0, 4);
      token.addToIndexes();
    }

  }

}
View Full Code Here

    // analysis engine.
    AnalysisEngine desc = createEngine(IndexTestComponent.class);
    JCas jcas = desc.newJCas();

    Token token1 = new Token(jcas, 1, 2);
    token1.addToIndexes();

    // index1 is a sorted index, so when adding a token twice, both remain in the index
    Token token2 = new Token(jcas, 3, 4);
    token2.addToIndexes();
    token2.addToIndexes();
View Full Code Here

    Token token1 = new Token(jcas, 1, 2);
    token1.addToIndexes();

    // index1 is a sorted index, so when adding a token twice, both remain in the index
    Token token2 = new Token(jcas, 3, 4);
    token2.addToIndexes();
    token2.addToIndexes();

    Sentence sentence1 = new Sentence(jcas, 1, 2);
    sentence1.addToIndexes();
View Full Code Here

    token1.addToIndexes();

    // index1 is a sorted index, so when adding a token twice, both remain in the index
    Token token2 = new Token(jcas, 3, 4);
    token2.addToIndexes();
    token2.addToIndexes();

    Sentence sentence1 = new Sentence(jcas, 1, 2);
    sentence1.addToIndexes();

    // index2 is a set index, so even when adding a sentence twice, only one remains in the index
View Full Code Here

        throw new AnalysisEngineProcessException(e);
      }

      view.setDocumentText("some text");
      Token token = new Token(view, 0, 4);
      token.addToIndexes();
    }

  }

  public static class SofaUnawareAnnotator extends JCasAnnotator_ImplBase {
View Full Code Here

    @Override
    public void process(JCas jCas) throws AnalysisEngineProcessException {
      jCas.setDocumentText("some text");
      Token token = new Token(jCas, 0, 4);
      token.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.