Package org.apache.ctakes.relationextractor.ae

Examples of org.apache.ctakes.relationextractor.ae.LocationOfRelationExtractorAnnotator


 
  private void countEntityMentionPairs(JCas jCas, JCas goldView) {
   
    for(Sentence sentence : JCasUtil.select(jCas, Sentence.class)) {
      if(targetRelationType.equals("location_of")) {
        LocationOfRelationExtractorAnnotator emPairAnnot = new LocationOfRelationExtractorAnnotator();
        List<IdentifiedAnnotationPair> pairs = emPairAnnot.getCandidateRelationArgumentPairs(goldView, sentence);
        entityMentionPairCount += pairs.size();
      }
      if(targetRelationType.equals("degree_of")) {
        DegreeOfRelationExtractorAnnotator degreeOfAnnot = new DegreeOfRelationExtractorAnnotator();
        List<IdentifiedAnnotationPair> pairs = degreeOfAnnot.getCandidateRelationArgumentPairs(goldView, sentence);
View Full Code Here


  private void countEntityMentionPairTypes(JCas jCas, JCas goldView) {
   
    for(Sentence sentence : JCasUtil.select(jCas, Sentence.class)) {
        
      if(targetRelationType.equals("location_of")) {
        LocationOfRelationExtractorAnnotator emPairAnnot = new LocationOfRelationExtractorAnnotator();
        List<IdentifiedAnnotationPair> pairs = emPairAnnot.getCandidateRelationArgumentPairs(goldView, sentence);
        for(IdentifiedAnnotationPair pair : pairs) {
          String type1 = getEntityType(pair.getArg1().getTypeID());
          String type2 = getEntityType(pair.getArg2().getTypeID());
          entityMentionPairTypes.add(type1 + " - " + type2);
        }
View Full Code Here

TOP

Related Classes of org.apache.ctakes.relationextractor.ae.LocationOfRelationExtractorAnnotator

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.