本文整理了Java中de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS.getBegin()
方法的一些代码示例,展示了POS.getBegin()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。POS.getBegin()
方法的具体详情如下:
包路径:de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS
类名称:POS
方法名:getBegin
暂无
代码示例来源:origin: oaqa/knn4qa
@Override
public void process(JCas aJCas) throws AnalysisEngineProcessException {
try {
for (POS pos : JCasUtil.select(aJCas, POS.class)) {
String text = pos.getCoveredText().toLowerCase();
String posTag = pos.getPosValue();
String wnss = "";
try {
wnss = mWordNet.getLexName(text, posTag);
} catch (IllegalArgumentException e) {
logger.warn("Failed to process word '" + text + "' tag: '" + posTag);
}
if (!wnss.isEmpty()) {
WNNS annot = new WNNS(aJCas, pos.getBegin(), pos.getEnd());
annot.setSuperSense(wnss);
annot.addToIndexes();
//System.out.println(annot.getSuperSense() + " " + annot.getBegin() + ":" + annot.getEnd());
}
}
} catch (Exception e) {
throw new AnalysisEngineProcessException(e);
}
}
}
代码示例来源:origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.posfilter-asl
int begin = oldPos.getBegin();
int end = oldPos.getEnd();
代码示例来源:origin: webanno/webanno
for (POS pos : JCasUtil.selectCovered(getJCas(), POS.class, token.getBegin(),
token.getEnd())) {
if (pos.getBegin() == token.getBegin() && pos.getEnd() == token.getEnd()) {
if (pos.getPosValue().equals(this.posTag)) {
duplicate = true;
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-tei
for (POS pos : JCasUtil.selectCovered(getJCas(), POS.class, token.getBegin(),
token.getEnd())) {
if (pos.getBegin() == token.getBegin() && pos.getEnd() == token.getEnd()) {
if (pos.getPosValue().equals(this.posTag)) {
duplicate = true;
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/webanno-io-tei
for (POS pos : JCasUtil.selectCovered(getJCas(), POS.class, token.getBegin(),
token.getEnd())) {
if (pos.getBegin() == token.getBegin() && pos.getEnd() == token.getEnd()) {
if (pos.getPosValue().equals(this.posTag)) {
duplicate = true;
代码示例来源:origin: de.tudarmstadt.ukp.clarin.webanno/de.tudarmstadt.ukp.clarin.webanno.tei
for (POS pos : JCasUtil.selectCovered(getJCas(), POS.class, token.getBegin(),
token.getEnd())) {
if (pos.getBegin() == token.getBegin() && pos.getEnd() == token.getEnd()) {
if (pos.getPosValue().equals(this.posTag)) {
duplicate = true;
代码示例来源:origin: webanno/webanno
@Override
public void process(JCas aJCas) throws AnalysisEngineProcessException
{
for (Lemma lemma : select(aJCas, Lemma.class)) {
Token t = selectSingleAt(aJCas, Token.class, lemma.getBegin(), lemma.getEnd());
assert t.getLemma() == lemma;
}
for (Stem stem : select(aJCas, Stem.class)) {
Token t = selectSingleAt(aJCas, Token.class, stem.getBegin(), stem.getEnd());
assert t.getStem() == stem;
}
for (MorphologicalFeatures morph : select(aJCas, MorphologicalFeatures.class)) {
Token t = selectSingleAt(aJCas, Token.class, morph.getBegin(), morph.getEnd());
assert t.getMorph() == morph;
}
for (POS pos : select(aJCas, POS.class)) {
Token t = selectSingleAt(aJCas, Token.class, pos.getBegin(), pos.getEnd());
assert t.getPos() == pos;
}
for (Dependency dep : select(aJCas, Dependency.class)) {
assert dep.getBegin() == dep.getDependent().getBegin();
assert dep.getEnd() == dep.getDependent().getEnd();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!