本文整理汇总了Java中se.lth.cs.srl.corpus.Predicate.getMySentence方法的典型用法代码示例。如果您正苦于以下问题:Java Predicate.getMySentence方法的具体用法?Java Predicate.getMySentence怎么用?Java Predicate.getMySentence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类se.lth.cs.srl.corpus.Predicate
的用法示例。
在下文中一共展示了Predicate.getMySentence方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCoreArgumentLabelSequence
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getCoreArgumentLabelSequence(Predicate pred,Map<Word, String> proposition) {
Sentence s=pred.getMySentence();
StringBuffer ret=new StringBuffer();
for(int i=1;i<s.size();++i){
Word w=s.get(i);
if(pred==w){
ret.append(" ").append(pred.getSense());
if(useVoice)
ret.append(isPassive(pred)?"/P":"/A");
}
if(proposition.containsKey(w)){
Matcher m=CALSPattern.matcher(proposition.get(w));
if(m.matches())
ret.append(" ").append(m.group(1));
}
}
return ret.toString();
}
示例2: getCoreArgumentLabelSequence
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getCoreArgumentLabelSequence(Predicate pred,Map<Word, String> proposition) {
Sentence sen=pred.getMySentence();
StringBuilder ret=new StringBuilder();
for(int i=1,size=sen.size();i<size;++i){
Word w=sen.get(i);
if(pred==w){
ret.append(" "+pred.getSense());
}
if(proposition.containsKey(w)){
String label=proposition.get(w);
if(CALSPattern.matcher(label).matches())
ret.append(" "+label);
}
}
return ret.toString();
}
示例3: getCoreArgumentLabelSequence
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getCoreArgumentLabelSequence(Predicate pred, Map<Word, String> proposition) {
Sentence sen=pred.getMySentence();
StringBuilder ret=new StringBuilder();
for(int i=1,size=sen.size();i<size;++i){
Word word=sen.get(i);
if(pred==word){
ret.append(" "+pred.getSense()+"/");
ret.append(isPassiveVoice(pred) ? "P" : "A");
} //Don't make this else if, since the predicate can also be its on argument
if(proposition.containsKey(word)){
String label=proposition.get(word);
if(CALSPattern.matcher(label).matches())
ret.append(" "+label);
}
}
return ret.toString();
}
示例4: getCoreArgumentLabelSequence
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getCoreArgumentLabelSequence(Predicate pred,Map<Word, String> proposition) {
Sentence sen=pred.getMySentence();
StringBuilder ret=new StringBuilder();
for(int i=1,size=sen.size();i<size;++i){
Word word=sen.get(i);
if(pred==word){
ret.append(" "+pred.getSense()+"/");
ret.append(isPassiveVoice(pred) ? "P" : "A");
}
if(proposition.containsKey(word)){
ret.append(" "+proposition.get(word));
}
}
return ret.toString();
}
示例5: getCoreArgumentLabelSequence
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getCoreArgumentLabelSequence(Predicate pred,
Map<Word, String> proposition) {
Sentence s = pred.getMySentence();
StringBuffer ret = new StringBuffer();
for (int i = 1; i < s.size(); ++i) {
Word w = s.get(i);
if (pred == w) {
ret.append(" ").append(pred.getSense());
if (useVoice)
ret.append(isPassive(pred) ? "/P" : "/A");
}
if (proposition.containsKey(w)) {
Matcher m = CALSPattern.matcher(proposition.get(w));
if (m.matches())
ret.append(" ").append(m.group(1));
}
}
return ret.toString();
}
示例6: getCoreArgumentLabelSequence
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getCoreArgumentLabelSequence(Predicate pred,
Map<Word, String> proposition) {
Sentence sen = pred.getMySentence();
StringBuilder ret = new StringBuilder();
for (int i = 1, size = sen.size(); i < size; ++i) {
Word word = sen.get(i);
if (pred == word) {
ret.append(" " + pred.getSense() + "/");
ret.append(isPassiveVoice(pred) ? "P" : "A");
} // Don't make this else if, since the predicate can also be its on
// argument
if (proposition.containsKey(word)) {
String label = proposition.get(word);
if ((Parse.parseOptions != null
&& Parse.parseOptions.globalFeats && Parse.parseOptions.framenetdir != null)
|| ((Learn.learnOptions != null
&& Learn.learnOptions.globalFeats && Learn.learnOptions.framenetdir != null))
|| CALSPattern.matcher(label).matches())
ret.append(" " + label);
}
}
return ret.toString();
}
示例7: getCoreArgumentLabelSequence
import se.lth.cs.srl.corpus.Predicate; //导入方法依赖的package包/类
@Override
public String getCoreArgumentLabelSequence(Predicate pred,
Map<Word, String> proposition) {
Sentence sen = pred.getMySentence();
StringBuilder ret = new StringBuilder();
for (int i = 1, size = sen.size(); i < size; ++i) {
Word word = sen.get(i);
if (pred == word) {
ret.append(" " + pred.getSense() + "/");
ret.append(isPassiveVoice(pred) ? "P" : "A");
}
if (proposition.containsKey(word)) {
ret.append(" " + proposition.get(word));
}
}
return ret.toString();
}