本文整理汇总了Java中edu.cornell.cs.nlp.spf.mr.lambda.LogicLanguageServices.isArrayIndexPredicate方法的典型用法代码示例。如果您正苦于以下问题:Java LogicLanguageServices.isArrayIndexPredicate方法的具体用法?Java LogicLanguageServices.isArrayIndexPredicate怎么用?Java LogicLanguageServices.isArrayIndexPredicate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.cornell.cs.nlp.spf.mr.lambda.LogicLanguageServices
的用法示例。
在下文中一共展示了LogicLanguageServices.isArrayIndexPredicate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AMRSupervisedFilterFactory
import edu.cornell.cs.nlp.spf.mr.lambda.LogicLanguageServices; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public AMRSupervisedFilterFactory(
Predicate<LogicalConstant> constantsFilter) {
this.constantFilter = (Serializable & Predicate<LogicalConstant>) constant -> !(LogicLanguageServices
.isCollpasibleConstant(constant)
|| LogicLanguageServices.isArrayIndexPredicate(constant)
|| constant.getType().equals(SkolemServices.getIDType())
|| constant.equals(AMRServices.getDummyEntity())
|| CoordinationServices.isCoordinator(constant))
&& constantsFilter.test(constant);
this.baseFilterFactory = new SupervisedFilterFactory<>(
this.constantFilter,
(Serializable & Predicate<LogicalExpression>) (
arg) -> !(arg instanceof Literal && (DummyEntityServices
.isRelationWithDummy((Literal) arg)
|| ((Literal) arg).numArgs() == 2
&& ((Literal) arg)
.getArg(1) instanceof Variable)),
(Serializable & UnaryOperator<LogicalConstant>) c -> OverloadedLogicalConstant
.getWrapped(c));
}
示例2: visit
import edu.cornell.cs.nlp.spf.mr.lambda.LogicLanguageServices; //导入方法依赖的package包/类
@Override
public void visit(LogicalConstant logicalConstant) {
if (logicalConstant.getType().isComplex()
&& !LogicLanguageServices
.isCoordinationPredicate(logicalConstant)
&& !LogicLanguageServices
.isArrayIndexPredicate(logicalConstant)
&& !LogicLanguageServices.isArraySubPredicate(logicalConstant)) {
// Case found a predicate, add it to the return set
predicates.add(logicalConstant);
}
}
示例3: visit
import edu.cornell.cs.nlp.spf.mr.lambda.LogicLanguageServices; //导入方法依赖的package包/类
@Override
public void visit(Literal literal) {
// Visit the predicate
literal.getPredicate().accept(this);
final LogicalExpression pred = literal.getPredicate();
final int numArgs = literal.numArgs();
if (!LogicLanguageServices.isCoordinationPredicate(pred)
&& !LogicLanguageServices.isArrayIndexPredicate(pred)
&& !LogicLanguageServices.isArraySubPredicate(pred)
&& literal.getPredicate() instanceof LogicalConstant) {
if (numArgs == 1
&& !(literal.getArg(0) instanceof LogicalConstant)) {
// Unary predicates
predConstPairs.add(Pair.of(literal.getPredicate(),
(LogicalExpression) null));
return;
} else if (numArgs == 2
&& !(literal.getArg(0) instanceof LogicalConstant)
&& IsExtendedConstant.of(literal.getArg(1))) {
// Binary predicate
predConstPairs.add(Pair.of(literal.getPredicate(),
literal.getArg(1)));
return;
}
}
// Just visit the arguments and predicate
for (int i = 0; i < numArgs; ++i) {
literal.getArg(i).accept(this);
}
}
示例4: isFactorable
import edu.cornell.cs.nlp.spf.mr.lambda.LogicLanguageServices; //导入方法依赖的package包/类
public static boolean isFactorable(LogicalConstant constant) {
return !LogicLanguageServices.isCoordinationPredicate(constant)
&& !LogicLanguageServices.isArrayIndexPredicate(constant)
&& !LogicLanguageServices.isArraySubPredicate(constant)
&& !LogicLanguageServices.getTypeRepository().getIndexType()
.equals(constant.getType())
&& INSTANCE.filter.apply(constant)
&& !INSTANCE.unfactoredConstants.contains(constant);
}
示例5: test
import edu.cornell.cs.nlp.spf.mr.lambda.LogicLanguageServices; //导入方法依赖的package包/类
@Override
public boolean test(LogicalConstant constant) {
return !(LogicLanguageServices.isCollpasibleConstant(constant)
|| LogicLanguageServices.isArrayIndexPredicate(constant)
|| constant.getType().equals(SkolemServices.getIDType()))
&& baseFilter.test(constant);
}