de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS.setEnd()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(136)

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

POS.setEnd介绍

暂无

代码示例

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

/** @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 POS(JCas jcas, int begin, int end) {
 super(jcas);
 setBegin(begin);
 setEnd(end);
 readObject();
}

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

private void convertPos(JCas aJCas, TextCorpus aCorpusData, Map<String, Token> aTokens) {
  if (aCorpusData.getPosTagsLayer() == null) {
    return;
  }
  for (int i = 0; i < aCorpusData.getPosTagsLayer().size(); i++) {
    eu.clarin.weblicht.wlfxb.tc.api.Token[] posTokens = aCorpusData.getPosTagsLayer()
        .getTokens(aCorpusData.getPosTagsLayer().getTag(i));
    String value = aCorpusData.getPosTagsLayer().getTag(i).getString();
    POS outPos = new POS(aJCas);
    outPos.setBegin(aTokens.get(posTokens[0].getID()).getBegin());
    outPos.setEnd(aTokens.get(posTokens[0].getID()).getEnd());
    outPos.setPosValue(value);
    outPos.addToIndexes();
    // Set the POS to the token
    aTokens.get(posTokens[0].getID()).setPos(outPos);
  }
}

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

private void convertPos(JCas aJCas, TextCorpus aCorpusData, Map<String, Token> aTokens) {
  if (aCorpusData.getPosTagsLayer() == null) {
    return;
  }
  for (int i = 0; i < aCorpusData.getPosTagsLayer().size(); i++) {
    eu.clarin.weblicht.wlfxb.tc.api.Token[] posTokens = aCorpusData.getPosTagsLayer()
        .getTokens(aCorpusData.getPosTagsLayer().getTag(i));
    String value = aCorpusData.getPosTagsLayer().getTag(i).getString();
    POS outPos = new POS(aJCas);
    outPos.setBegin(aTokens.get(posTokens[0].getID()).getBegin());
    outPos.setEnd(aTokens.get(posTokens[0].getID()).getEnd());
    outPos.setPosValue(value);
    outPos.addToIndexes();
    // Set the POS to the token
    aTokens.get(posTokens[0].getID()).setPos(outPos);
  }
}

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

private void convertPos(JCas aJCas, TextCorpus aCorpusData, Map<String, Token> aTokens)
{
  if (aCorpusData.getPosTagsLayer() == null) {
    return;
  }
  for (int i = 0; i < aCorpusData.getPosTagsLayer().size(); i++) {
    eu.clarin.weblicht.wlfxb.tc.api.Token[] posTokens = aCorpusData.getPosTagsLayer()
        .getTokens(aCorpusData.getPosTagsLayer().getTag(i));
    String value = aCorpusData.getPosTagsLayer().getTag(i).getString();
    POS outPos = new POS(aJCas);
    outPos.setBegin(aTokens.get(posTokens[0].getID()).getBegin());
    outPos.setEnd(aTokens.get(posTokens[0].getID()).getEnd());
    outPos.setPosValue(value);
    outPos.addToIndexes();
    // Set the POS to the token
    aTokens.get(posTokens[0].getID()).setPos(outPos);
  }
}

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

private void convertPos(JCas aJCas, TextCorpus aCorpusData, Map<String, Token> aTokens)
{
  if (aCorpusData.getPosTagsLayer() == null) {
    return;
  }
  for (int i = 0; i < aCorpusData.getPosTagsLayer().size(); i++) {
    eu.clarin.weblicht.wlfxb.tc.api.Token[] posTokens = aCorpusData.getPosTagsLayer()
        .getTokens(aCorpusData.getPosTagsLayer().getTag(i));
    String value = aCorpusData.getPosTagsLayer().getTag(i).getString();
    POS outPos = new POS(aJCas);
    outPos.setBegin(aTokens.get(posTokens[0].getID()).getBegin());
    outPos.setEnd(aTokens.get(posTokens[0].getID()).getEnd());
    outPos.setPosValue(value);
    POSUtils.assignCoarseValue(outPos);
    outPos.addToIndexes();
    // Set the POS to the token
    aTokens.get(posTokens[0].getID()).setPos(outPos);
  }
}

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

pos.setEnd(aToken.getEnd());

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

dependentPos = new POS(aJCas);
dependentPos.setBegin(aTokens.get(dependentTokens[0].getID()).getBegin());
dependentPos.setEnd(aTokens.get(dependentTokens[0].getID()).getEnd());
dependentPos.setPosValue("--");
dependentPos.addToIndexes();
    governerPos = new POS(aJCas);
    governerPos.setBegin(aTokens.get(governorTokens[0].getID()).getBegin());
    governerPos.setEnd(aTokens.get(governorTokens[0].getID()).getEnd());
    governerPos.setPosValue("--");
    governerPos.addToIndexes();

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

dependentPos = new POS(aJCas);
dependentPos.setBegin(aTokens.get(dependentTokens[0].getID()).getBegin());
dependentPos.setEnd(aTokens.get(dependentTokens[0].getID()).getEnd());
dependentPos.setPosValue("--");
dependentPos.addToIndexes();
    governerPos = new POS(aJCas);
    governerPos.setBegin(aTokens.get(governorTokens[0].getID()).getBegin());
    governerPos.setEnd(aTokens.get(governorTokens[0].getID()).getEnd());
    governerPos.setPosValue("--");
    governerPos.addToIndexes();

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

dependentPos = new POS(aJCas);
dependentPos.setBegin(aTokens.get(dependentTokens[0].getID()).getBegin());
dependentPos.setEnd(aTokens.get(dependentTokens[0].getID()).getEnd());
dependentPos.setPosValue("--");
dependentPos.addToIndexes();
    governerPos = new POS(aJCas);
    governerPos.setBegin(aTokens.get(governorTokens[0].getID()).getBegin());
    governerPos.setEnd(aTokens.get(governorTokens[0].getID()).getEnd());
    governerPos.setPosValue("--");
    governerPos.addToIndexes();

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

dependentPos = new POS(aJCas);
dependentPos.setBegin(aTokens.get(dependentTokens[0].getID()).getBegin());
dependentPos.setEnd(aTokens.get(dependentTokens[0].getID()).getEnd());
dependentPos.setPosValue("--");
dependentPos.setCoarseValue("--");
    governerPos = new POS(aJCas);
    governerPos.setBegin(aTokens.get(governorTokens[0].getID()).getBegin());
    governerPos.setEnd(aTokens.get(governorTokens[0].getID()).getEnd());
    governerPos.setPosValue("--");
    governerPos.addToIndexes();

代码示例来源:origin: hltfbk/Excitement-Open-Platform

.newInstance(aJCas.getView(viewName));
posAnnotation.setBegin(tok.getBegin());
posAnnotation.setEnd(tok.getEnd());
posAnnotation.setPosValue(tok.getBtbPOS());
posAnnotation.addToIndexes();

相关文章