private void addNamedEntity(JCas jcas, int begin, int end, Map<String, OntologyConcept> concepts, boolean bMedication, Set<NegSpan> negSet) { if (concepts.isEmpty()) return; IdentifiedAnnotation neLast = bMedication ? new MedicationEventMention( jcas) : new EntityMention(jcas); neLast.setPolarity(negSet.contains(new NegSpan(begin, end)) ? CONST.NE_POLARITY_NEGATION_PRESENT : CONST.NE_POLARITY_NEGATION_ABSENT); neLast.setBegin(begin); neLast.setEnd(end); FSArray ocArr = new FSArray(jcas, concepts.size()); int ocArrIdx = 0; for (OntologyConcept oc : concepts.values()) { // set the cui field if this is in fact a cui ocArr.set(ocArrIdx, oc); ocArrIdx++; } neLast.setOntologyConceptArr(ocArr); concepts.clear(); neLast.addToIndexes(); }
private void addNamedEntity(JCas jcas, int begin, int end, Map<String, OntologyConcept> concepts, boolean bMedication, Set<NegSpan> negSet) { if (concepts.isEmpty()) return; IdentifiedAnnotation neLast = bMedication ? new MedicationEventMention( jcas) : new EntityMention(jcas); neLast.setPolarity(negSet.contains(new NegSpan(begin, end)) ? CONST.NE_POLARITY_NEGATION_PRESENT : CONST.NE_POLARITY_NEGATION_ABSENT); neLast.setBegin(begin); neLast.setEnd(end); FSArray ocArr = new FSArray(jcas, concepts.size()); int ocArrIdx = 0; for (OntologyConcept oc : concepts.values()) { // set the cui field if this is in fact a cui ocArr.set(ocArrIdx, oc); ocArrIdx++; } neLast.setOntologyConceptArr(ocArr); concepts.clear(); neLast.addToIndexes(); }
neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP ); neAnnot.setOntologyConceptArr( ocArr ); neAnnot.addToIndexes(); } else {
neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP ); neAnnot.setOntologyConceptArr( ocArr ); neAnnot.addToIndexes(); } else {
annotation.setEnd( spanCuis.getKey().getEnd() ); annotation.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP ); annotation.setOntologyConceptArr( conceptArr ); annotation.addToIndexes();
annotation.setEnd( spanCuis.getKey().getEnd() ); annotation.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP ); annotation.setOntologyConceptArr( conceptArr ); annotation.addToIndexes();
mention.setOntologyConceptArr(new FSArray(jCas, 1)); mention.setOntologyConceptArr(0, ontologyConcept);
mention.setOntologyConceptArr(new FSArray(jCas, 1)); mention.setOntologyConceptArr(0, ontologyConcept);
mention.setOntologyConceptArr(new FSArray(jCas, 1)); mention.setOntologyConceptArr(0, ontologyConcept);
mention.setOntologyConceptArr(new FSArray(jCas, 1)); mention.setOntologyConceptArr(0, ontologyConcept);
neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP ); neAnnot.setOntologyConceptArr( conceptArr ); neAnnot.addToIndexes();
neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP ); neAnnot.setOntologyConceptArr( conceptArr ); neAnnot.addToIndexes();
neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP ); neAnnot.setOntologyConceptArr( ocArr ); neAnnot.setTypeID( typeId ); neAnnot.addToIndexes();
neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP ); neAnnot.setOntologyConceptArr( ocArr ); neAnnot.setTypeID( typeId ); neAnnot.addToIndexes();
entityOrEventMention.setOntologyConceptArr(ontologyConceptArray);
entityOrEventMention.setOntologyConceptArr(ontologyConceptArray);
arrIdx++; annotation.setOntologyConceptArr( conceptArr );
mention.setDiscoveryTechnique(original.getDiscoveryTechnique()); mention.setGeneric(original.getGeneric()); mention.setOntologyConceptArr(original.getOntologyConceptArr()); mention.setPolarity(original.getPolarity()); mention.setSegmentID(original.getSegmentID());