/** * * @param goldAnnotation * @param jcas */ private static void copyAnnotation(Annotation goldAnnotation, JCas jcas) { Annotation newAnno; if (goldAnnotation instanceof IdentifiedAnnotation) { IdentifiedAnnotation ia = new IdentifiedAnnotation(jcas); ia.setConditional(((IdentifiedAnnotation) goldAnnotation).getConditional()); ia.setConfidence(((IdentifiedAnnotation) goldAnnotation).getConfidence()); ia.setDiscoveryTechnique(((IdentifiedAnnotation)goldAnnotation).getDiscoveryTechnique()); ia.setGeneric(((IdentifiedAnnotation) goldAnnotation).getGeneric()); ia.setHistoryOf(((IdentifiedAnnotation) goldAnnotation).getHistoryOf()); ia.setPolarity(((IdentifiedAnnotation) goldAnnotation).getPolarity()); ia.setSegmentID(((IdentifiedAnnotation) goldAnnotation).getSegmentID()); ia.setSentenceID(((IdentifiedAnnotation) goldAnnotation).getSentenceID()); ia.setSubject(((IdentifiedAnnotation) goldAnnotation).getSubject()); ia.setTypeID(((IdentifiedAnnotation) goldAnnotation).getTypeID()); ia.setUncertainty(((IdentifiedAnnotation) goldAnnotation).getUncertainty()); newAnno = ia; } else { throw new RuntimeException("Unexpected class of object " + goldAnnotation.getClass()); } newAnno.setBegin(goldAnnotation.getBegin()); newAnno.setEnd(goldAnnotation.getEnd()); newAnno.addToIndexes(); }
/** * * @param goldAnnotation * @param jcas */ private static void copyAnnotation(Annotation goldAnnotation, JCas jcas) { Annotation newAnno; if (goldAnnotation instanceof IdentifiedAnnotation) { IdentifiedAnnotation ia = new IdentifiedAnnotation(jcas); ia.setConditional(((IdentifiedAnnotation) goldAnnotation).getConditional()); ia.setConfidence(((IdentifiedAnnotation) goldAnnotation).getConfidence()); ia.setDiscoveryTechnique(((IdentifiedAnnotation)goldAnnotation).getDiscoveryTechnique()); ia.setGeneric(((IdentifiedAnnotation) goldAnnotation).getGeneric()); ia.setHistoryOf(((IdentifiedAnnotation) goldAnnotation).getHistoryOf()); ia.setPolarity(((IdentifiedAnnotation) goldAnnotation).getPolarity()); ia.setSegmentID(((IdentifiedAnnotation) goldAnnotation).getSegmentID()); ia.setSentenceID(((IdentifiedAnnotation) goldAnnotation).getSentenceID()); ia.setSubject(((IdentifiedAnnotation) goldAnnotation).getSubject()); ia.setTypeID(((IdentifiedAnnotation) goldAnnotation).getTypeID()); ia.setUncertainty(((IdentifiedAnnotation) goldAnnotation).getUncertainty()); newAnno = ia; } else { throw new RuntimeException("Unexpected class of object " + goldAnnotation.getClass()); } newAnno.setBegin(goldAnnotation.getBegin()); newAnno.setEnd(goldAnnotation.getEnd()); newAnno.addToIndexes(); }
mention.setPolarity(original.getPolarity()); mention.setSegmentID(original.getSegmentID()); mention.setSentenceID(original.getSentenceID()); mention.setSubject(original.getSubject()); mention.setTypeID(original.getTypeID());