本文整理汇总了Java中se.lth.cs.srl.corpus.Predicate.getLemma方法的典型用法代码示例。如果您正苦于以下问题:Java Predicate.getLemma方法的具体用法?Java Predicate.getLemma怎么用?Java Predicate.getLemma使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类se.lth.cs.srl.corpus.Predicate
的用法示例。
在下文中一共展示了Predicate.getLemma方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDefaultSense
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getDefaultSense(Predicate pred) {
String PFeat=pred.getFeats();
String label;
if(PFeat.contains("postype=auxiliary")){
label="c2";
} else if(PFeat.contains("postype=common")) {
label="a2";
} else if(PFeat.contains("postype=main")) {
label="a2";
} else if(PFeat.contains("postype=qualificative")) {
label="b2";
} else if(PFeat.contains("postype=semiauxiliary")) {
label="c2";
} else {
label="a2";
}
return pred.getLemma()+"."+label;
}
示例2: getDefaultSense
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getDefaultSense(Predicate pred) {
String PFeat = pred.getFeats();
String label;
if (PFeat.contains("postype=auxiliary")) {
label = "c2";
} else if (PFeat.contains("postype=common")) {
label = "a2";
} else if (PFeat.contains("postype=main")) {
label = "a2";
} else if (PFeat.contains("postype=qualificative")) {
label = "b2";
} else if (PFeat.contains("postype=semiauxiliary")) {
label = "c2";
} else {
label = "a2";
}
return pred.getLemma() + "." + label;
}
示例3: getLexiconURL
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getLexiconURL(Predicate pred) {
if(pred.getPOS().startsWith("V")){
return "http://verbs.colorado.edu/propbank/framesets-english/"+pred.getLemma()+"-v.html";
} else {
return "http://nlp.cs.nyu.edu/meyers/nombank/nombank.1.0/frames/"+pred.getLemma()+".xml";
}
}
示例4: parse
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
public void parse(Sentence s) {
for(Predicate pred:s.getPredicates()){
String POSPrefix=getPOSPrefix(pred);
String lemma=pred.getLemma();
String sense;
if(POSPrefix==null){
sense=predicateReference.getSimpleSense(pred, null);
} else {
String filename=predicateReference.getFileName(lemma,POSPrefix);
if(filename==null){
sense=predicateReference.getSimpleSense(pred,POSPrefix);
} else {
Model m=getModel(filename);
Collection<Integer> indices=new TreeSet<Integer>();
Integer offset=0;
for(Feature f:featureSet.get(POSPrefix)){
f.addFeatures(indices,pred,null,offset,false);
offset+=f.size(false);
}
Integer label=m.classify(indices);
sense=predicateReference.getSense(lemma,POSPrefix,label);
}
}
pred.setSense(sense);
}
}
示例5: getLexiconURL
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getLexiconURL(Predicate pred) {
if (pred.getPOS().startsWith("V")) {
return "http://verbs.colorado.edu/propbank/framesets-english/"
+ pred.getLemma() + "-v.html";
} else {
return "http://nlp.cs.nyu.edu/meyers/nombank/nombank.1.0/frames/"
+ pred.getLemma() + ".xml";
}
}
示例6: getLexiconURL
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getLexiconURL(Predicate pred) {
//dunno if this still works
return "http://clic.ub.edu/mbertran/ancora/lexentry.php?file="+pred.getLemma()+".lex.xml&lexicon=AnCoraVerb_ES";
}
示例7: getDefaultSense
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getDefaultSense(Predicate pred) {
return pred.getLemma()+".01";
}
示例8: getDefaultSense
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getDefaultSense(Predicate pred) {
return pred.getLemma()+".1";
}
示例9: getLexiconURL
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getLexiconURL(Predicate pred) {
// dunno if this still works
return "http://clic.ub.edu/mbertran/ancora/lexentry.php?file="
+ pred.getLemma() + ".lex.xml&lexicon=AnCoraVerb_ES";
}
示例10: getDefaultSense
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getDefaultSense(Predicate pred) {
return pred.getLemma() + ".01";
}
示例11: getDefaultSense
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getDefaultSense(Predicate pred) {
return pred.getLemma() + ".1";
}