Examples of Annotation


Examples of edu.pitt.dbmi.nlp.noble.uima.Annotation

          for (int j=sentStartTok; j<=sentEndTok; j++) {
            sentenceAccumulator += tokens[j] + whites[j+1];
          }
          int sPos = textAccumulator.length();
          int ePos = sPos + StringUtils.chomp(sentenceAccumulator, whites[sentEndTok+1]).length();
          Annotation sentenceAnnotation = new Annotation("Sentence", sPos, ePos, text.substring(sPos, ePos));
        sentenceAnnotations.add(sentenceAnnotation);
        textAccumulator += sentenceAccumulator;
          sentStartTok = sentEndTok+1;
      }
    }
View Full Code Here

Examples of edu.pitt.dbmi.nobletools.uima.Annotation

          for (int j=sentStartTok; j<=sentEndTok; j++) {
            sentenceAccumulator += tokens[j] + whites[j+1];
          }
          int sPos = textAccumulator.length();
          int ePos = sPos + StringUtils.chomp(sentenceAccumulator, whites[sentEndTok+1]).length();
          Annotation sentenceAnnotation = new Annotation("Sentence", sPos, ePos, text.substring(sPos, ePos));
        sentenceAnnotations.add(sentenceAnnotation);
        textAccumulator += sentenceAccumulator;
          sentStartTok = sentEndTok+1;
      }
    }
View Full Code Here

Examples of edu.pitt.terminology.lexicon.Annotation

        //String w = TextTools.normalize(a.getText(),true);
        // this word was encountered before, saved previous annoation
        // if the gap between last word and next word is more then 2 words,
        // it must be a seperate mention and deserves a seperate annotation
        if(lastWordOffset > -1 && (offs-lastWordOffset) > 2){
          Annotation an = new Annotation();
          an.setSearchString(text);
          an.setConcept(c);
          an.setOffset(st);
          an.setText(text.substring(st,en));
          list.add(an);
          //usedWords.clear();
          st = -1;
        }
       
        // start w/ first annotation
        if(st < 0)
          st = a.getStartPosition();
        // remember end position
        en = a.getEndPosition();
       
        //usedWords.add(w);
        lastWordOffset = offs;
      }
      // finish last annotation
      if(st >= 0 && en >= 0){
        Annotation an = new Annotation();
        an.setSearchString(text);
        an.setConcept(c);
        an.setOffset(st);
        an.setText(text.substring(st,en));
        list.add(an);
      }
    }catch(Exception ex){
      System.err.println("match: "+c.getMatchedTerm()+" | name: "+c.getName()+" | code: "+c.getCode());
      System.err.println("annotations: "+Arrays.toString(c.getAnnotations()));
View Full Code Here

Examples of edu.stanford.nlp.pipeline.Annotation

* @author Angel Chang
*/
public class TextAnnotationCreator extends AbstractTextAnnotationCreator {
  @Override
  public Annotation createFromText(String text) throws IOException {
    return new Annotation(text);
  }
View Full Code Here

Examples of eu.admire.dispel.classifiers.Annotation

        if (result == null) result = caseCommentable(enumeration);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case ClassifiersPackage.ANNOTATION: {
        Annotation annotation = (Annotation)theEObject;
        T result = caseAnnotation(annotation);
        if (result == null) result = caseConcreteClassifier(annotation);
        if (result == null) result = caseClassifier(annotation);
        if (result == null) result = caseMemberContainer(annotation);
        if (result == null) result = caseMember(annotation);
View Full Code Here

Examples of gate.Annotation

      String featurename) {
    AnnotationSet toSet = getAnnsForType(getBindings(bindings, toBindings),
        toType);
    AnnotationSet fromSet = getAnnsForType(getBindings(bindings, fromBindings),
        fromType);
    Annotation toAnn = getLongestAnn(toSet);
    Annotation fromAnn = getLongestAnn(fromSet);
    FeatureMap toFm = toAnn.getFeatures();
    FeatureMap fromFm = fromAnn.getFeatures();
    toFm.put(featurename, fromFm.get(featurename));
  }
View Full Code Here

Examples of gnu.xml.validation.datatype.Annotation

    String ref = getAttribute(attrs, "ref");
    String use = getAttribute(attrs, "use");
    String type = getAttribute(attrs, "type");
    SimpleType datatype = (type == null) ? null :
      parseSimpleType(asQName(type, node));
    Annotation annotation = null;
    for (Node child = node.getFirstChild(); child != null;
         child = child.getNextSibling())
      {
        String uri = child.getNamespaceURI();
        String name = child.getLocalName();
View Full Code Here

Examples of jadx.core.dex.attributes.annotations.Annotation

    Section section = dex.openSection(offset);
    int size = section.readInt();
    List<Annotation> list = new ArrayList<Annotation>(size);
    for (int i = 0; i < size; i++) {
      Section anSection = dex.openSection(section.readInt());
      Annotation a = readAnnotation(dex, anSection, true);
      list.add(a);
    }
    return new AnnotationsList(list);
  }
View Full Code Here

Examples of java.lang.annotation.Annotation

            for(Field f : cls.getDeclaredFields()) {
                if(f.getName().startsWith("this$")) {// for anonymous class
                    f.setAccessible(true);
                    injectFieldResource(f.get(target), annCls, injector); // recursion
                } else {
                    Annotation ann = f.getAnnotation(annCls);
                    if(ann != null) {
                        injector.inject(f, target, ann);
                    }
                }
            }
View Full Code Here

Examples of java.lang.annotation.Annotation

    generateBasicClass(aa);
    checkClass(defineClass("C", cw.toByteArray()));
  }

  protected void checkClass(Class c) throws Exception {
    Annotation a = c.getAnnotation(Deprecated.class);
    assertNull(a);
  }
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.