Examples of EntityMention


Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

//        modifier.removeFromIndexes();
//      }
     
      for (EntityMention oldSystemEntityMention : JCasUtil.select(jCas, EntityMention.class))
      {
        EntityMention newGoldEntityMention = new EntityMention(goldView, oldSystemEntityMention.getBegin(), oldSystemEntityMention.getEnd());
       
        // copying assertion fields
        newGoldEntityMention.setDiscoveryTechnique(oldSystemEntityMention.getDiscoveryTechnique());
        newGoldEntityMention.setUncertainty(oldSystemEntityMention.getUncertainty());
        newGoldEntityMention.setConditional(oldSystemEntityMention.getConditional());
        newGoldEntityMention.setGeneric(oldSystemEntityMention.getGeneric());
        newGoldEntityMention.setPolarity(oldSystemEntityMention.getPolarity());
        newGoldEntityMention.setSubject(oldSystemEntityMention.getSubject());
        newGoldEntityMention.setHistoryOf(oldSystemEntityMention.getHistoryOf());

        // copying non-assertion fields
        newGoldEntityMention.setConfidence(oldSystemEntityMention.getConfidence());
        newGoldEntityMention.setTypeID(oldSystemEntityMention.getTypeID());
       
        newGoldEntityMention.addToIndexes();
      }

      for (EventMention oldSystemEventMention : JCasUtil.select(jCas, EventMention.class))
      {
        EventMention newGoldEventMention = new EventMention(goldView, oldSystemEventMention.getBegin(), oldSystemEventMention.getEnd());
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

        // put entity and attributes into the CAS
        // choose either entity or event
        IdentifiedAnnotation eMention;
        int type = Mapper.getEntityTypeId(entityTypes.get(mentionId));
        if (type==CONST.NE_TYPE_ID_ANATOMICAL_SITE) {
          eMention = new EntityMention(initView, first.start, last.end)
        } else if (type==CONST.NE_TYPE_ID_DISORDER
            || type==CONST.NE_TYPE_ID_DRUG
            || type==CONST.NE_TYPE_ID_FINDING
            || type==CONST.NE_TYPE_ID_PROCEDURE
            || type==CONST.NE_TYPE_ID_ANATOMICAL_SITE
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

        entityMention.removeFromIndexes();
      }

      // copy over the manually annotated Modifiers
      for (EntityMention entityMention : JCasUtil.select(goldView, EntityMention.class)) {
        EntityMention newEntityMention = new EntityMention(jCas, entityMention.getBegin(), entityMention.getEnd());
        newEntityMention.setTypeID(entityMention.getTypeID());
        newEntityMention.setId(entityMention.getId());
        newEntityMention.setDiscoveryTechnique(entityMention.getDiscoveryTechnique());
        newEntityMention.setConfidence(entityMention.getConfidence());
        newEntityMention.addToIndexes();
      }
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

//        modifier.removeFromIndexes();
//      }
     
      for (EntityMention oldSystemEntityMention : JCasUtil.select(jCas, EntityMention.class))
      {
        EntityMention newGoldEntityMention = new EntityMention(goldView, oldSystemEntityMention.getBegin(), oldSystemEntityMention.getEnd());
       
        // copying assertion fields
        newGoldEntityMention.setDiscoveryTechnique(oldSystemEntityMention.getDiscoveryTechnique());
        newGoldEntityMention.setUncertainty(oldSystemEntityMention.getUncertainty());
        newGoldEntityMention.setConditional(oldSystemEntityMention.getConditional());
        newGoldEntityMention.setGeneric(oldSystemEntityMention.getGeneric());
        newGoldEntityMention.setPolarity(oldSystemEntityMention.getPolarity());
        newGoldEntityMention.setSubject(oldSystemEntityMention.getSubject());
        newGoldEntityMention.setHistoryOf(oldSystemEntityMention.getHistoryOf());

        // copying non-assertion fields
        newGoldEntityMention.setConfidence(oldSystemEntityMention.getConfidence());
        newGoldEntityMention.setTypeID(oldSystemEntityMention.getTypeID());
       
        newGoldEntityMention.addToIndexes();
      }

      for (EventMention oldSystemEventMention : JCasUtil.select(jCas, EventMention.class))
      {
        EventMention newGoldEventMention = new EventMention(goldView, oldSystemEventMention.getBegin(), oldSystemEventMention.getEnd());
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

        EntityMention.class,
        sentence);

    // look for sentence with two entities
    if (args.size() == 2) {
      EntityMention arg1 = args.get(0);
      EntityMention arg2 = args.get(1);
      // there are two entities in this sentence
      // are they of suitable types for location_of?
      for (IdentifiedAnnotationPair pair : Lists.newArrayList(
          new IdentifiedAnnotationPair(arg1, arg2),
          new IdentifiedAnnotationPair(arg2, arg1))) {
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

   
    List<IdentifiedAnnotationPair> result = new ArrayList<IdentifiedAnnotationPair>();
    Set<EntityMention> alreadyLinked = new HashSet<EntityMention>();
   
    for(Modifier modifier : modifiers) {
      EntityMention nearestEntity = getNearestEntity(identifiedAnnotationView, modifier, entitiesSuitableForDegreeOf);
     
      // don't link if there's an another modifier between this one and its nearest entity
      if(checkForModifierBetween(identifiedAnnotationView, modifier, nearestEntity)) {
        continue;
      }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

   
    List<IdentifiedAnnotationPair> result = new ArrayList<IdentifiedAnnotationPair>();
    Set<EntityMention> alreadyLinked = new HashSet<EntityMention>();
   
    for(EntityMention anatomicalSite : anatomicalSites) {
      EntityMention nearestEntity = getNearestEntity(identifiedAnnotationView, anatomicalSite, entitiesSuitableForLocationOf);
     
      // don't link if there's an another anatomical site between this one and its nearest entity
      if(checkForAnatomicalSiteBetween(identifiedAnnotationView, anatomicalSite, nearestEntity)) {
        continue;
      }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

        if (conceptType.equals(ConceptType.TREATMENT))
        {
          entityOrEventMention = new EventMention(jcas);
        } else
        {
          entityOrEventMention = new EntityMention(jcas);
        }
       
        LineAndTokenPosition assertionStart = new LineAndTokenPosition();
        LineAndTokenPosition assertionEnd = new LineAndTokenPosition();
        assertionStart.setLine(a.getBegin().getLine());
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

                  } else if ( conceptKey == CONST.NE_TYPE_ID_LAB ) {
                      neAnnot = new LabMention( jcas );
                  } else if ( conceptKey == CONST.NE_TYPE_ID_PROCEDURE ) {
                      neAnnot = new ProcedureMention( jcas );
                  } else {
                      neAnnot = new EntityMention( jcas );
                  }
                  neAnnot.setTypeID( conceptKey );
                  neAnnot.setBegin( neBegin );
                  neAnnot.setEnd( neEnd );
                  neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textsem.EntityMention

         } else if ( typeId == CONST.NE_TYPE_ID_LAB ) {
             neAnnot = new LabMention( jcas );
         } else if ( typeId == CONST.NE_TYPE_ID_PROCEDURE ) {
             neAnnot = new ProcedureMention( jcas );
         } else {
             neAnnot = new EntityMention( jcas );
         }
         final int neBegin = entry.getKey().__start;
         final int neEnd = entry.getKey().__end;
         neAnnot.setBegin( neBegin );
         neAnnot.setEnd( neEnd );
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.