本文整理汇总了Java中edu.uw.easysrl.util.Util.debugHook方法的典型用法代码示例。如果您正苦于以下问题:Java Util.debugHook方法的具体用法?Java Util.debugHook怎么用?Java Util.debugHook使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.uw.easysrl.util.Util
的用法示例。
在下文中一共展示了Util.debugHook方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: combineNodes
import edu.uw.easysrl.util.Util; //导入方法依赖的package包/类
@Override
public AgendaItem combineNodes(final AgendaItem leftChild, final AgendaItem rightChild, final SyntaxTreeNode node) {
final int score = scoreNode(node);
if (rightChild.getParse().getHead().getWord().equals("around")) {
Util.debugHook();
}
int expectedDeps = 0;
for (final ResolvedDependency dep : gold) {
if (expected(leftChild, rightChild, dep) || expected(rightChild, leftChild, dep)) {
expectedDeps++;
}
}
final double insideScore = leftChild.getInsideScore() + rightChild.getInsideScore() + score;
return new AgendaItem(node, insideScore, leftChild.outsideScoreUpperbound + rightChild.outsideScoreUpperbound
- globalUpperBound - expectedDeps, leftChild.getStartOfSpan(), leftChild.getSpanLength()
+ rightChild.getSpanLength(), true);
}
示例2: printParse
import edu.uw.easysrl.util.Util; //导入方法依赖的package包/类
@Override
protected void printParse(final SyntaxTreeNode parse, final int sentenceNumber, final StringBuilder result) {
final List<List<ResolvedDependency>> labels = new ArrayList<>();
for (final SyntaxTreeNodeLeaf leaf : parse.getLeaves()) {
labels.add(new ArrayList<>(leaf.getCategory().getNumberOfArguments()));
for (int i = 0; i < leaf.getCategory().getNumberOfArguments(); i++) {
labels.get(labels.size() - 1).add(null); // TODO
}
}
for (final ResolvedDependency dep : parse.getAllLabelledDependencies()) {
final List<ResolvedDependency> labelsForWord = labels.get(dep.getHead());
if (dep.getArgumentIndex() > -1) {
labelsForWord.set(dep.getArgNumber() - 1, dep);
}
}
Preconditions.checkState(parse.getSemantics().isPresent());
result.append(parse.getSemantics().get());
Util.debugHook();
}
示例3: doSubstitution
import edu.uw.easysrl.util.Util; //导入方法依赖的package包/类
@Override
public Logic doSubstitution(final Substitution substitution) {
if (substitution.containsAny(vars)) {
Util.debugHook();
}
Preconditions.checkArgument(!substitution.containsAny(vars));
return new LambdaExpression(statement.doSubstitution(substitution), vars);
}