/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public IdentifiedAnnotation(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public IdentifiedAnnotation(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public IdentifiedAnnotation(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public IdentifiedAnnotation(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
identifiedAnnotation.setBegin(sortedTreebankNodes.get(0).getBegin()); identifiedAnnotation.setEnd(sortedTreebankNodes.get(0).getEnd());
identifiedAnnotation.setBegin(sortedTreebankNodes.get(0).getBegin()); identifiedAnnotation.setEnd(sortedTreebankNodes.get(0).getEnd());
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(); }
IdentifiedAnnotation neAnnot = new MedicationMention( jcas ); // medication NEs are EventMention neAnnot.setTypeID( CONST.NE_TYPE_ID_DRUG ); neAnnot.setBegin( neBegin ); neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
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(); }
IdentifiedAnnotation neAnnot = new MedicationMention( jcas ); // medication NEs are EventMention neAnnot.setTypeID( CONST.NE_TYPE_ID_DRUG ); neAnnot.setBegin( neBegin ); neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
annotation.setBegin( spanCuis.getKey().getStart() ); annotation.setEnd( spanCuis.getKey().getEnd() ); annotation.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
@Override public void process(JCas jcas) throws AnalysisEngineProcessException { // Create a dummy IdentifiedAnnotation in the type system // If the BaseToken Part Of Speech is a Noun Collection<BaseToken> tokens = JCasUtil.select(jcas, BaseToken.class); for (BaseToken token : tokens) { if (saveAnnotation && token.getPartOfSpeech() != null && token.getPartOfSpeech().startsWith("N")) { IdentifiedAnnotation ann = new IdentifiedAnnotation(jcas); ann.setBegin(token.getBegin()); ann.setEnd(token.getEnd()); ann.addToIndexes(); if (printAnnotation) { LOG.info("Token:" + token.getCoveredText() + " POS:" + token.getPartOfSpeech()); } } } }
annotation.setBegin( spanCuis.getKey().getStart() ); annotation.setEnd( spanCuis.getKey().getEnd() ); annotation.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
neAnnot.setBegin( neBegin ); neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
neAnnot.setBegin( neBegin ); neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
neAnnot.setBegin( neBegin ); neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
neAnnot.setBegin( neBegin ); neAnnot.setEnd( neEnd ); neAnnot.setDiscoveryTechnique( CONST.NE_DISCOVERY_TECH_DICT_LOOKUP );
IdentifiedAnnotation m = (IdentifiedAnnotation) ctor.newInstance(jCas); m.setBegin(mention.getBegin()); m.setEnd(mention.getEnd()); for (Selector s : msg.keySet()) {
IdentifiedAnnotation m = (IdentifiedAnnotation) ctor.newInstance(jCas); m.setBegin(mention.getBegin()); m.setEnd(mention.getEnd()); for (Selector s : msg.keySet()) {
mention.setBegin(original.getBegin()); mention.setEnd(original.getEnd()); mention.setConditional(original.getConditional());