本文整理汇总了Java中edu.cornell.cs.nlp.spf.mr.lambda.LogicalConstant.equals方法的典型用法代码示例。如果您正苦于以下问题:Java LogicalConstant.equals方法的具体用法?Java LogicalConstant.equals怎么用?Java LogicalConstant.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.cornell.cs.nlp.spf.mr.lambda.LogicalConstant
的用法示例。
在下文中一共展示了LogicalConstant.equals方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import edu.cornell.cs.nlp.spf.mr.lambda.LogicalConstant; //导入方法依赖的package包/类
@Override
public void visit(LogicalConstant logicalConstant) {
testInterruption();
// Try to get from cache
if (services.isCached(logicalConstant)) {
result = services.getFromCache(logicalConstant);
return;
}
if (logicalConstant.equals(LogicLanguageServices.getTrue())) {
result = true;
} else if (logicalConstant.equals(LogicLanguageServices.getFalse())) {
result = false;
} else {
// call domain services to process
result = services.evaluateConstant(logicalConstant);
}
// Cache
services.cacheResult(logicalConstant, result);
}
示例2: visit
import edu.cornell.cs.nlp.spf.mr.lambda.LogicalConstant; //导入方法依赖的package包/类
@Override
public void visit(LogicalConstant logicalConstant) {
if (logicalConstant.equals(applicationArgument)) {
result = applicationVariable;
subExpReplaced = true;
} else {
result = logicalConstant;
}
}
示例3: isDateSemantics
import edu.cornell.cs.nlp.spf.mr.lambda.LogicalConstant; //导入方法依赖的package包/类
private boolean isDateSemantics(LogicalExpression semantics) {
if (semantics == null || !AMRServices.isSkolemTerm(semantics)) {
return false;
}
final LogicalConstant typingPredicate = AMRServices
.getTypingPredicate((Literal) semantics);
if (typingPredicate == null) {
LOG.error("Null typing predicate: %s", semantics);
return false;
}
return typingPredicate.equals(dateInstanceType);
}
示例4: visit
import edu.cornell.cs.nlp.spf.mr.lambda.LogicalConstant; //导入方法依赖的package包/类
@Override
public void visit(LogicalConstant logicalConstant) {
// Remove dummy constants.
if (logicalConstant.equals(AMRServices.getDummyEntity())) {
result = null;
} else {
result = logicalConstant;
}
}
示例5: visit
import edu.cornell.cs.nlp.spf.mr.lambda.LogicalConstant; //导入方法依赖的package包/类
@Override
public void visit(LogicalConstant logicalConstant) {
isValid = logicalConstant.equals(applicationResult);
}
示例6: isAmrCoordinationPredicate
import edu.cornell.cs.nlp.spf.mr.lambda.LogicalConstant; //导入方法依赖的package包/类
/**
* Checks if the given constant is a coordination typing predicate (i.e.,
* and:<e,t> or or:<e,t>).
*/
public static boolean isAmrCoordinationPredicate(LogicalConstant predicate) {
return predicate.equals(INSTANCE.entityConjunctionInstance)
|| predicate.equals(INSTANCE.entityDisjunctionInstance);
}