Examples of CoreferenceRelation


Examples of org.apache.ctakes.typesystem.type.relation.CoreferenceRelation

      }else if(anaphor instanceof DemMarkable){
        bestAnte = processDem(anaphor, ll, jcas);
      }

      if(bestAnte.prob > CorefConsts.COREF_THRESHOLD){
        CoreferenceRelation cr = new CoreferenceRelation(jcas);
        RelationArgument ra1 = new RelationArgument(jcas);
        ra1.setId(bestAnte.m.getId());
        ra1.setArgument(bestAnte.m.getContent());
        ra1.setRole("antecedent");
        RelationArgument ra2 = new RelationArgument(jcas);
        ra2.setId(anaphor.getId());
        ra2.setArgument(anaphor.getContent());
        ra2.setRole("anaphor");
        cr.setArg1(ra1);
        cr.setArg2(ra2);
        cr.setConfidence(bestAnte.prob);
        ra1.addToIndexes();
        ra2.addToIndexes();
        cr.addToIndexes();
        ppt.union(m2q.get(anaphor), m2q.get(bestAnte.m));
        if(anaphor instanceof PronounMarkable){
          // if the anaphor is a pronoun then it won't be in the cas as an identifiedannotation so we need to add it.
          IdentifiedAnnotation ia = new IdentifiedAnnotation(jcas);
         
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.relation.CoreferenceRelation

        continue;
      }

      if(bestAnte.prob > CorefConsts.COREF_THRESHOLD){
        // create the coref relation type
        CoreferenceRelation cr = new CoreferenceRelation(jcas);
        cr.setCategory("Coreference");
        RelationArgument ra1 = new RelationArgument(jcas);
        ra1.setId(bestAnte.m.getId());
        ra1.setArgument(bestAnte.m.getContent());
        ra1.setRole("antecedent");
        RelationArgument ra2 = new RelationArgument(jcas);
        ra2.setId(anaphor.getId());
        ra2.setArgument(anaphor.getContent());
        ra2.setRole("anaphor");
        cr.setArg1(ra1);
        cr.setArg2(ra2);
        cr.setConfidence(bestAnte.prob);
        ra1.addToIndexes();
        ra2.addToIndexes();
        cr.addToIndexes();
       
        // propagate the collection relation type
        RelationArgument anaRa = new RelationArgument(jcas);
        anaRa.setId(anaphor.getId());
        anaRa.setArgument(anaphor.getContent());
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.