Package org.apache.uima.annotator.regex

Examples of org.apache.uima.annotator.regex.Annotation


            // create annotation object
            String id = annotationList[a].getId();
            String type = annotationList[a].getType();
            String validationClass = annotationList[a].getValidate();

            Annotation annotation = new Annotation_impl(id, type, begin, end,
                  validationClass);

            // read out feature values and add it to the annotation
            SetFeatureDocument.SetFeature[] features = annotationList[a]
                  .getSetFeatureArray();
            for (int f = 0; f < features.length; f++) {
               String name = features[f].getName();
               int featureType = features[f].getType().intValue();
               String value = features[f].getStringValue();
               int normalization = 0;
               if (features[f].getNormalization() != null) {
                  normalization = features[f].getNormalization().intValue();
               }
               String implClass = features[f].getClass1();

               Feature feature = new Feature_impl(featureType, name, value,
                     normalization, implClass);
               annotation.addFeature(feature);
            }
            // add annotation to rule
            concept.addAnnotation(annotation);
         }
         conceptList.add(concept);
View Full Code Here

TOP

Related Classes of org.apache.uima.annotator.regex.Annotation

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.