Examples of addToIndexes()


Examples of org.apache.ctakes.typesystem.type.syntax.ConllDependencyNode.addToIndexes()

                while (itt.hasNext() || itn.hasNext()) {
                    if (bt.getBegin()==dn.getBegin() ) { // Allow ragged right edge //&& bt.getEnd()==dn.getEnd()) {
                        dn.setLemma( bt.getNormalizedForm() );
                        if (dn.getLemma()==null)
                            dn.setLemma( dn.getForm().toLowerCase() );
                        dn.addToIndexes();
                        if (itt.hasNext()) bt = itt.next();
                        if (itn.hasNext()) dn = itn.next();
                    } else if ( bt.getBegin()<dn.getBegin() ) {
                        if (itt.hasNext()) bt = itt.next(); else break;
                    } else if ( bt.getBegin()>dn.getBegin() ) {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.NewlineToken.addToIndexes()

          nta = new NewlineToken(jcas, i, i+2);
          i++; // skip past the LF
        } else {
          nta = new NewlineToken(jcas, i, i+1);
        }
        nta.addToIndexes();

      } else if (docText.charAt(i)==LF) {

        NewlineToken nta = new NewlineToken(jcas, i, i+1);
        nta.addToIndexes();
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.TerminalTreebankNode.addToIndexes()

        // pre-terminal case - now we can set the type (POS tag) and point the parent in the right direction
        TerminalTreebankNode term = root.getTerminals(subtree.getHeadIndex());
        term.setNodeType(subtree.getType());
        children.set(i,term);
        term.setParent(parent);
        term.addToIndexes();
      }else{
        try{
          TreebankNode child = new TreebankNode(jcas);
          child.setParent(parent);
          children.set(i, child);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.TopTreebankNode.addToIndexes()

      buff.append("(S null)");
    }

    TopTreebankNode ttn = new TopTreebankNode(jcas);
    ttn.setTreebankParse(buff.toString());
    ttn.addToIndexes();
  }
 
  public static void main(String[] args) throws UIMAException, IOException{
    if(args.length < 2){
      System.err.println("Requires 2 arguments: <input file> <output file>");
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.TreebankNode.addToIndexes()

        try{
          TreebankNode child = new TreebankNode(jcas);
          child.setParent(parent);
          children.set(i, child);
          recursivelyCreateStructure(jcas, child, subtree, root);
          child.addToIndexes();
        }catch(NullPointerException e){
          System.err.println("MaxentParserWrapper Error: " + e);
          throw new AnalysisEngineProcessException();
        }
      }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.syntax.WordToken.addToIndexes()

    String text = "acetaminophen";
      jCas.setDocumentText(text);
      WordToken tok = new WordToken(jCas);
      tok.setBegin(0);
      tok.setEnd(text.length());
      tok.addToIndexes();
      LookupWindowAnnotation lwa = new LookupWindowAnnotation(jCas);
      lwa.setBegin(0);
      lwa.setEnd(text.length());
      lwa.addToIndexes();
    AggregateBuilder builder = new AggregateBuilder();
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.temporary.assertion.AssertionCuePhraseAnnotation.addToIndexes()

    cuePhraseAnnotation.setCuePhrase(key);

    cuePhraseAnnotation.setCuePhraseCategory(cueWord.category);
    cuePhraseAnnotation.setCuePhraseAssertionFamily(cueWord.family);

    cuePhraseAnnotation.addToIndexes();
   
  }
}

class CuePhrase{
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.AnatomicalSiteMention.addToIndexes()

        date.setMonth(month);
        date.setDay(day);
        date.addToIndexes();
        TimeMention mention = new TimeMention(jCas, coveringSpan.begin, coveringSpan.end);
        mention.setDate(date);
        mention.addToIndexes();
        idAnnotationMap.put(annotation.id, mention);

      } else if (eventRelationTypes.contains(annotation.type)) {
        // store the ALINK information for later, once all annotations are in the CAS
        DelayedRelation relation = new DelayedRelation();
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.BodyLateralityModifier.addToIndexes()

          throw new UnsupportedOperationException("Invalid BodyLaterality: " + value);
        }
        attribute.setValue(value);
        attribute.addToIndexes();
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("superior_or_inferior".equals(annotation.type)) {
        String value = stringSlots.remove("superior_or_inferior_normalization");
        BodyLateralityModifier modifier = new BodyLateralityModifier(jCas, coveringSpan.begin, coveringSpan.end);
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.BodySideModifier.addToIndexes()

        BodySide attribute = new BodySide(jCas);
        attribute.setValue(stringSlots.remove("body_side_normalization"));
        attribute.addToIndexes();
        BodySideModifier modifier = new BodySideModifier(jCas, coveringSpan.begin, coveringSpan.end);
        modifier.setNormalizedForm(attribute);
        modifier.addToIndexes();
        idAnnotationMap.put(annotation.id, modifier);

      } else if ("course_class".equals(annotation.type)) {
        Course attribute = new Course(jCas);
        attribute.setValue(stringSlots.remove("course_normalization"));
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.