private void getExtraDeps(List<TypedDependency> deps, Predicate<TypedDependency> puncTypedDepFilter, DirectedMultiGraph<TreeGraphNode, GrammaticalRelation> completeGraph) { getExtras(deps); // adds stuff to basicDep based on the tregex patterns over the tree this.getTreeDeps(deps, completeGraph, puncTypedDepFilter, extraTreeDepFilter()); Collections.sort(deps); }
private void getExtraDeps(List<TypedDependency> deps, Predicate<TypedDependency> puncTypedDepFilter, DirectedMultiGraph<TreeGraphNode, GrammaticalRelation> completeGraph) { getExtras(deps); // adds stuff to basicDep based on the tregex patterns over the tree this.getTreeDeps(deps, completeGraph, puncTypedDepFilter, extraTreeDepFilter()); Collections.sort(deps); }
private void getExtraDeps(List<TypedDependency> deps, Predicate<TypedDependency> puncTypedDepFilter, DirectedMultiGraph<TreeGraphNode, GrammaticalRelation> completeGraph) { getExtras(deps); // adds stuff to basicDep based on the tregex patterns over the tree this.getTreeDeps(deps, completeGraph, puncTypedDepFilter, extraTreeDepFilter()); Collections.sort(deps); }
/** * Get the typed dependencies after collapsing them. * The "collapsed" option corresponds to calling this method with argument * {@code true}. * * @param includeExtras If true, the list of typed dependencies * returned may include "extras", like controlling subjects * @return collapsed dependencies */ public List<TypedDependency> typedDependenciesCollapsed(boolean includeExtras) { List<TypedDependency> tdl = typedDependencies(false); // Adds stuff to the basic dependencies. // We don't want to simply call typedDependencies with // "includeExtras" because the collapseDependencies method may add // the extras in a way that makes more logical sense. For // example, the English dependencies, when CC processed, have more // nsubjs than they originally do. If we wait until that occurs // to add xsubj for xcomp dependencies, we get better coverage. // TODO: this might not be necessary any more if (includeExtras) { getExtras(tdl); getTreeDeps(root(), tdl, new NoPunctTypedDependencyFilter(puncFilter), extraTreeDepFilter()); } collapseDependencies(tdl, false, includeExtras); return tdl; }
/** * Get the typed dependencies after collapsing them and processing eventual * CC complements. The effect of this part is to distributed conjoined * arguments across relations or conjoined predicates across their arguments. * This is generally useful, and we generally recommend using the output of * this method with the second argument being {@code true}. * The "CCPropagated" option corresponds to calling this method with an * argument of {@code true}. * * @param includeExtras If true, the list of typed dependencies * returned may include "extras", such as controlled subject links. * @return collapsed dependencies with CC processed */ public List<TypedDependency> typedDependenciesCCprocessed(boolean includeExtras) { List<TypedDependency> tdl = typedDependencies(false); // Adds stuff to the basic dependencies. // We don't want to simply call typedDependencies with // "includeExtras" because the collapseDependencies method may add // the extras in a way that makes more logical sense. For // example, the English dependencies, when CC processed, have more // nsubjs than they originally do. If we wait until that occurs // to add xsubj for xcomp dependencies, we get better coverage. // TODO: this might not be necessary any more if (includeExtras) { getExtras(tdl); getTreeDeps(root(), tdl, new NoPunctTypedDependencyFilter(puncFilter), extraTreeDepFilter()); } collapseDependencies(tdl, true, includeExtras); return tdl; }
getExtras(basicDep); getTreeDeps(root(), basicDep, puncTypedDepFilter, extraTreeDepFilter());