Package org.apache.uima.annotator.dict_annot.dictionary

Examples of org.apache.uima.annotator.dict_annot.dictionary.DictionaryMatch


         // iterate over the annotation array and detect matches
         int currentPos = 0;
         while (currentPos < annotFSs.length) {

            // check for dictionary matches at the current token position
            DictionaryMatch dictMatch = this.dictionaries[i].matchEntry(
                  currentPos, annotFSs, this.inputMatchFeaturePath);

            // check if we have a dictionary match
            if (dictMatch != null) {
               // -- we have found a match starting at the current position --

               // get match length of the match
               int matchLength = dictMatch.getMatchLength();

               // create annotation for the match we found
               int start = annotFSs[currentPos].getBegin();
               int end = annotFSs[currentPos + matchLength - 1].getEnd();
               FeatureStructure fs = cas.createAnnotation(
View Full Code Here


      // iterate over the annotation array and detect matches
      int currentPos = 0;
      while (currentPos < annotFSs.length) {

        // check for dictionary matches at the current token position
        DictionaryMatch dictMatch = this.dictionaries[i].matchEntry(currentPos, annotFSs,
                this.inputMatchFeaturePath);

        // check if we have a dictionary match
        if (dictMatch != null) {
          // -- we have found a match starting at the current position --

          // get match length of the match
          int matchLength = dictMatch.getMatchLength();

          // create annotation for the match we found
          int start = annotFSs[currentPos].getBegin();
          int end = annotFSs[currentPos + matchLength - 1].getEnd();
          FeatureStructure fs = cas.createAnnotation(currentDictOutputType, start, end);
View Full Code Here

TOP

Related Classes of org.apache.uima.annotator.dict_annot.dictionary.DictionaryMatch

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.