org.apache.uima.cas.text.AnnotationFS.setFeatureValueFromString()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(76)

本文整理了Java中org.apache.uima.cas.text.AnnotationFS.setFeatureValueFromString()方法的一些代码示例,展示了AnnotationFS.setFeatureValueFromString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnnotationFS.setFeatureValueFromString()方法的具体详情如下:
包路径:org.apache.uima.cas.text.AnnotationFS
类名称:AnnotationFS
方法名:setFeatureValueFromString

AnnotationFS.setFeatureValueFromString介绍

暂无

代码示例

代码示例来源:origin: webanno/webanno

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);
  }
}

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tsv

annotation = null;
newAnnotation.setFeatureValueFromString(feature, annotation);
aJcas.addFsToIndexes(newAnnotation);
newAnnotation.setFeatureValueFromString(feature, annotation);
aJcas.addFsToIndexes(newAnnotation);
indexedAnnos.put(index, newAnnotation);

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tsv

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);
  }
}

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tsv

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));

代码示例来源:origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.dictionaryannotator-asl

newFound.setFeatureValueFromString(f, value);

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tsv

annotation = null;
newAnnotation.setFeatureValueFromString(feature, annotation);
aJcas.addFsToIndexes(newAnnotation);
newAnnotation.setFeatureValueFromString(feature, annotation);
aJcas.addFsToIndexes(newAnnotation);
indexedAnnos.put(index, newAnnotation);

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/de.tudarmstadt.ukp.clarin.webanno.tsv

annotation = null;
newAnnotation.setFeatureValueFromString(feature, annotation);
aJcas.addFsToIndexes(newAnnotation);
newAnnotation.setFeatureValueFromString(feature, annotation);
aJcas.addFsToIndexes(newAnnotation);
indexedAnnos.put(index, newAnnotation);

代码示例来源:origin: dkpro/dkpro-core

newFound.setFeatureValueFromString(f, value);

代码示例来源:origin: webanno/webanno

annotation = null;
newAnnotation.setFeatureValueFromString(feature, annotation);
aJcas.addFsToIndexes(newAnnotation);
newAnnotation.setFeatureValueFromString(feature, annotation);
aJcas.addFsToIndexes(newAnnotation);
indexedAnnos.put(index, newAnnotation);

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tsv

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));

代码示例来源:origin: webanno/webanno

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));

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/de.tudarmstadt.ukp.clarin.webanno.brat

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) {

代码示例来源:origin: CLLKazan/UIMA-Ext

String featValStr = _anno.getFeatureStringValue(featName);
if (featValStr != null) {
  anno.setFeatureValueFromString(feat, featValStr);

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-ui-automation

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) {

代码示例来源:origin: webanno/webanno

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) {

代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/de.tudarmstadt.ukp.clarin.webanno.brat

if (aFeature != null) {
  Feature feature = type.getFeatureByBaseName(aFeature.getName());
  fs.setFeatureValueFromString(feature, aValue);

相关文章