当前位置: 首页>>代码示例>>Java>>正文


Java LogicLanguageServices.isArrayIndexPredicate方法代码示例

本文整理汇总了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));
}
 
开发者ID:clic-lab,项目名称:amr,代码行数:22,代码来源:AMRSupervisedFilterFactory.java

示例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);
	}
}
 
开发者ID:clic-lab,项目名称:spf,代码行数:13,代码来源:GetAllPredicates.java

示例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);
	}
}
 
开发者ID:clic-lab,项目名称:spf,代码行数:33,代码来源:SingleSentencePartialCreditTestingStatistics.java

示例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);
}
 
开发者ID:clic-lab,项目名称:spf,代码行数:10,代码来源:FactoringServices.java

示例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);
}
 
开发者ID:clic-lab,项目名称:spf,代码行数:8,代码来源:SupervisedFilterFactory.java


注:本文中的edu.cornell.cs.nlp.spf.mr.lambda.LogicLanguageServices.isArrayIndexPredicate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。