Package opennlp.uima.util

Examples of opennlp.uima.util.AnnotationComboIterator


   * Performs pos-tagging on the given tcas object.
   */
  @Override
  public void process(CAS tcas) {

    final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
        this.sentenceType, this.tokenType);

    for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {
     
      final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<AnnotationFS>();
View Full Code Here


   * Performs name finding on the given cas object.
   */
  public final void process(CAS cas) {

    if (isRemoveExistingAnnotations) {
      final AnnotationComboIterator sentenceNameCombo = new AnnotationComboIterator(cas,
          mSentenceType, mNameType);
     
      List<AnnotationFS> removeAnnotations = new LinkedList<AnnotationFS>();
      for (AnnotationIteratorPair annotationIteratorPair : sentenceNameCombo) {
        for (AnnotationFS nameAnnotation : annotationIteratorPair.getSubIterator()) {
          removeAnnotations.add(nameAnnotation);
        }
      }
     
      for (AnnotationFS annotation : removeAnnotations) {
        cas.removeFsFromIndexes(annotation);
      }
    }
   
    final AnnotationComboIterator sentenceTokenCombo = new AnnotationComboIterator(cas,
        mSentenceType, mTokenType);
 
    for (AnnotationIteratorPair annotationIteratorPair : sentenceTokenCombo) {
     
      final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<AnnotationFS>();
View Full Code Here

   * Performs name finding on the given cas object.
   */
  public final void process(CAS cas) {

    if (isRemoveExistingAnnotations) {
      final AnnotationComboIterator sentenceNameCombo = new AnnotationComboIterator(cas,
          mSentenceType, mNameType);
     
      List<AnnotationFS> removeAnnotations = new LinkedList<AnnotationFS>();
      for (AnnotationIteratorPair annotationIteratorPair : sentenceNameCombo) {
        for (AnnotationFS nameAnnotation : annotationIteratorPair.getSubIterator()) {
          removeAnnotations.add(nameAnnotation);
        }
      }
     
      for (AnnotationFS annotation : removeAnnotations) {
        cas.removeFsFromIndexes(annotation);
      }
    }
   
    final AnnotationComboIterator sentenceTokenCombo = new AnnotationComboIterator(cas,
        mSentenceType, mTokenType);
 
    for (AnnotationIteratorPair annotationIteratorPair : sentenceTokenCombo) {
     
      final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<AnnotationFS>();
View Full Code Here

   * Performs pos-tagging on the given tcas object.
   */
  @Override
  public void process(CAS tcas) {

    final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
        this.sentenceType, this.tokenType);

    for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {
     
      final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<AnnotationFS>();
View Full Code Here

   * Performs pos-tagging on the given tcas object.
   */
  @Override
  public void process(CAS tcas) {

    final AnnotationComboIterator comboIterator = new AnnotationComboIterator(tcas,
        this.sentenceType, this.tokenType);

    for (AnnotationIteratorPair annotationIteratorPair : comboIterator) {

      final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<AnnotationFS>();
View Full Code Here

   * Performs name finding on the given cas object.
   */
  public final void process(CAS cas) {

    if (isRemoveExistingAnnotations) {
      final AnnotationComboIterator sentenceNameCombo = new AnnotationComboIterator(cas,
          mSentenceType, mNameType);

      List<AnnotationFS> removeAnnotations = new LinkedList<AnnotationFS>();
      for (AnnotationIteratorPair annotationIteratorPair : sentenceNameCombo) {
        for (AnnotationFS nameAnnotation : annotationIteratorPair.getSubIterator()) {
          removeAnnotations.add(nameAnnotation);
        }
      }

      for (AnnotationFS annotation : removeAnnotations) {
        cas.removeFsFromIndexes(annotation);
      }
    }

    final AnnotationComboIterator sentenceTokenCombo = new AnnotationComboIterator(cas,
        mSentenceType, mTokenType);

    for (AnnotationIteratorPair annotationIteratorPair : sentenceTokenCombo) {

      final List<AnnotationFS> sentenceTokenAnnotationList = new LinkedList<AnnotationFS>();
View Full Code Here

TOP

Related Classes of opennlp.uima.util.AnnotationComboIterator

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.