private void setPrimitiveValue(TsvColumn aCol, AnnotationFS aAnnotation, String aValue) { // Unescape value - this needs to be done after extracting the disambiguation ID and // after determining whether the values is a null value. if (!NULL_VALUE.equals(aValue)) { String value = Escaping.unescapeValue(aValue); Feature feat = aAnnotation.getType() .getFeatureByBaseName(aCol.uimaFeature.getShortName()); if (feat == null) { throw new IllegalArgumentException( "CAS type [" + aAnnotation.getType() + "] does not have a feature called [" + aCol.uimaFeature.getShortName() + "]"); } aAnnotation.setFeatureValueFromString(feat, value); } }
annotation = null; newAnnotation.setFeatureValueFromString(feature, annotation); aJcas.addFsToIndexes(newAnnotation); newAnnotation.setFeatureValueFromString(feature, annotation); aJcas.addFsToIndexes(newAnnotation); indexedAnnos.put(index, newAnnotation);
private void setPrimitiveValue(TsvColumn aCol, AnnotationFS aAnnotation, String aValue) { // Unescape value - this needs to be done after extracting the disambiguation ID and // after determining whether the values is a null value. if (!NULL_VALUE.equals(aValue)) { String value = Escaping.unescapeValue(aValue); Feature feat = aAnnotation.getType() .getFeatureByBaseName(aCol.uimaFeature.getShortName()); if (feat == null) { throw new IllegalArgumentException( "CAS type [" + aAnnotation.getType() + "] does not have a feature called [" + aCol.uimaFeature.getShortName() + "]"); } aAnnotation.setFeatureValueFromString(feat, value); } }
prevAnnoFs.setIntValue(endF, end); mAnno = getEscapeChars(mAnno); prevAnnoFs.setFeatureValueFromString(feat, mAnno); if (feat.getShortName().equals(REF_LINK)) { annos.get(i).setFeatureValueFromString(feat, refRel); chainAnnosPerTyep.putIfAbsent(type, new TreeMap<>()); chainAnnosPerTyep.get(type).putIfAbsent(chainNo, new TreeMap<>()); annos.get(i).setFeatureValueFromString(feat, mAnno); aJCas.addFsToIndexes(annos.get(i)); multiTokUnits.get(unit).put(ref, annos.get(i)); prevAnnoFs = annos.get(i); annos.get(i).setFeatureValueFromString(feat, mAnno); aJCas.addFsToIndexes(annos.get(i)); setAnnoRefPerUnit(unit, type, ref, annos.get(i));
newFound.setFeatureValueFromString(f, value);
annotation = null; newAnnotation.setFeatureValueFromString(feature, annotation); aJcas.addFsToIndexes(newAnnotation); newAnnotation.setFeatureValueFromString(feature, annotation); aJcas.addFsToIndexes(newAnnotation); indexedAnnos.put(index, newAnnotation);
annotation = null; newAnnotation.setFeatureValueFromString(feature, annotation); aJcas.addFsToIndexes(newAnnotation); newAnnotation.setFeatureValueFromString(feature, annotation); aJcas.addFsToIndexes(newAnnotation); indexedAnnos.put(index, newAnnotation);
newFound.setFeatureValueFromString(f, value);
annotation = null; newAnnotation.setFeatureValueFromString(feature, annotation); aJcas.addFsToIndexes(newAnnotation); newAnnotation.setFeatureValueFromString(feature, annotation); aJcas.addFsToIndexes(newAnnotation); indexedAnnos.put(index, newAnnotation);
prevAnnoFs.setIntValue(endF, end); mAnno = getEscapeChars(mAnno); prevAnnoFs.setFeatureValueFromString(feat, mAnno); if (feat.getShortName().equals(REF_LINK)) { annos.get(i).setFeatureValueFromString(feat, refRel); chainAnnosPerTyep.putIfAbsent(type, new TreeMap<>()); chainAnnosPerTyep.get(type).putIfAbsent(chainNo, annos.get(i).setFeatureValueFromString(feat, mAnno); aJCas.addFsToIndexes(annos.get(i)); multiTokUnits.get(unit).put(ref, annos.get(i)); prevAnnoFs = annos.get(i); annos.get(i).setFeatureValueFromString(feat, mAnno); aJCas.addFsToIndexes(annos.get(i)); setAnnoRefPerUnit(unit, type, ref, annos.get(i));
prevAnnoFs.setIntValue(endF, end); mAnno = getEscapeChars(mAnno); prevAnnoFs.setFeatureValueFromString(feat, mAnno); if (feat.getShortName().equals(REF_LINK)) { annos.get(i).setFeatureValueFromString(feat, refRel); chainAnnosPerTyep.putIfAbsent(type, new TreeMap<>()); chainAnnosPerTyep.get(type).putIfAbsent(chainNo, annos.get(i).setFeatureValueFromString(feat, mAnno); aJCas.addFsToIndexes(annos.get(i)); multiTokUnits.get(unit).put(ref, annos.get(i)); prevAnnoFs = annos.get(i); annos.get(i).setFeatureValueFromString(feat, mAnno); aJCas.addFsToIndexes(annos.get(i)); setAnnoRefPerUnit(unit, type, ref, annos.get(i));
newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "")); prevNe = "O"; aJcas.getCas().addFsToIndexes(newAnnotation); && value.startsWith("B-")) { newAnnotation = aJcas.getCas().createAnnotation(type, begin, end); newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "") .replace("I-", "")); prevNe = value; newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "") .replace("I-", "")); prevNe = value; AnnotationFS newAnnotation = aJcas.getCas().createAnnotation(type, token.getBegin(), token.getEnd()); newAnnotation.setFeatureValueFromString(feature, aLabelValues.get(i)); i++; if (getAttachFeatureName() != null) {
String featValStr = _anno.getFeatureStringValue(featName); if (featValStr != null) { anno.setFeatureValueFromString(feat, featValStr);
newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "")); prevNe = "O"; aJcas.getCas().addFsToIndexes(newAnnotation); prevNe.replace("B-", "").replace("I-", "")) && value.startsWith("B-")) { newAnnotation = aJcas.getCas().createAnnotation(type, begin, end); newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "").replace("I-", "")); prevNe = value; newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "").replace("I-", "")); prevNe = value; AnnotationFS newAnnotation = aJcas.getCas().createAnnotation(type, token.getBegin(), token.getEnd()); newAnnotation.setFeatureValueFromString(feature, aLabelValues.get(i)); i++; if (attachFeature != null) {
newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "")); prevNe = "O"; aJcas.getCas().addFsToIndexes(newAnnotation); prevNe.replace("B-", "").replace("I-", "")) && value.startsWith("B-")) { newAnnotation = aJcas.getCas().createAnnotation(type, begin, end); newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "").replace("I-", "")); prevNe = value; newAnnotation.setFeatureValueFromString(feature, prevNe.replace("B-", "").replace("I-", "")); prevNe = value; AnnotationFS newAnnotation = aJcas.getCas().createAnnotation(type, token.getBegin(), token.getEnd()); newAnnotation.setFeatureValueFromString(feature, aLabelValues.get(i)); i++; if (attachFeature != null) {
if (aFeature != null) { Feature feature = type.getFeatureByBaseName(aFeature.getName()); fs.setFeatureValueFromString(feature, aValue);