本文整理了Java中de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS.setBegin()
方法的一些代码示例,展示了POS.setBegin()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。POS.setBegin()
方法的具体详情如下:
包路径:de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS
类名称:POS
方法名:setBegin
暂无
代码示例来源: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.setBegin(aToken.getBegin());
pos.setEnd(aToken.getEnd());
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tcf
"There is no pos for this token, added is -- as a pos");
dependentPos = new POS(aJCas);
dependentPos.setBegin(aTokens.get(dependentTokens[0].getID()).getBegin());
dependentPos.setEnd(aTokens.get(dependentTokens[0].getID()).getEnd());
dependentPos.setPosValue("--");
"There is no pos for this token, added is -- as a pos");
governerPos = new POS(aJCas);
governerPos.setBegin(aTokens.get(governorTokens[0].getID()).getBegin());
governerPos.setEnd(aTokens.get(governorTokens[0].getID()).getEnd());
governerPos.setPosValue("--");
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/de.tudarmstadt.ukp.clarin.webanno.tcf
"There is no pos for this token, added is -- as a pos");
dependentPos = new POS(aJCas);
dependentPos.setBegin(aTokens.get(dependentTokens[0].getID()).getBegin());
dependentPos.setEnd(aTokens.get(dependentTokens[0].getID()).getEnd());
dependentPos.setPosValue("--");
"There is no pos for this token, added is -- as a pos");
governerPos = new POS(aJCas);
governerPos.setBegin(aTokens.get(governorTokens[0].getID()).getBegin());
governerPos.setEnd(aTokens.get(governorTokens[0].getID()).getEnd());
governerPos.setPosValue("--");
代码示例来源:origin: webanno/webanno
"There is no pos for this token, added is -- as a pos");
dependentPos = new POS(aJCas);
dependentPos.setBegin(aTokens.get(dependentTokens[0].getID()).getBegin());
dependentPos.setEnd(aTokens.get(dependentTokens[0].getID()).getEnd());
dependentPos.setPosValue("--");
"There is no pos for this token, added is -- as a pos");
governerPos = new POS(aJCas);
governerPos.setBegin(aTokens.get(governorTokens[0].getID()).getBegin());
governerPos.setEnd(aTokens.get(governorTokens[0].getID()).getEnd());
governerPos.setPosValue("--");
代码示例来源:origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.io.tcf-asl
getLogger().warn("There is no pos for this token, added [--] as a pos");
dependentPos = new POS(aJCas);
dependentPos.setBegin(aTokens.get(dependentTokens[0].getID()).getBegin());
dependentPos.setEnd(aTokens.get(dependentTokens[0].getID()).getEnd());
dependentPos.setPosValue("--");
getLogger().warn("There is no pos for this token, added [--] as a pos");
governerPos = new POS(aJCas);
governerPos.setBegin(aTokens.get(governorTokens[0].getID()).getBegin());
governerPos.setEnd(aTokens.get(governorTokens[0].getID()).getEnd());
governerPos.setPosValue("--");
代码示例来源:origin: hltfbk/Excitement-Open-Platform
POS posAnnotation = (POS) posAnnotClassCon
.newInstance(aJCas.getView(viewName));
posAnnotation.setBegin(tok.getBegin());
posAnnotation.setEnd(tok.getEnd());
posAnnotation.setPosValue(tok.getBtbPOS());
内容来源于网络,如有侵权,请联系作者删除!