Finds the highest node (i.e.
Finds the highest node (i.e. closest to a root) in an Interval of a directed graph. If there are multiple nodes of the same rank, chooseWhich adjudicates which single node is returned.
an Interval of nodes
a directed graph containing the nodes in span
a function deciding which of multiple heads is returned; the rightmost head selected by default
the single node which is closest to the root among those in span
Finds the highest node (i.e.
Finds the highest node (i.e. closest to a root) in an Interval of a directed graph, ignoring the graph outside the Interval. If there are multiple nodes of the same rank, chooseWhich adjudicates which single node is returned.
Crucially, any node that has an incoming edge from outside the Interval is considered a head. This is efficient if you know your span has a single head that is also within the span.
an Interval of nodes
a directed graph containing the nodes in span
a function deciding which of multiple heads is returned; the rightmost head selected by default
the single node which is closest to the root among those in span
Find the single highest node in an interval of a dependency graph, ignoring punctuation, coordinations, and prepositions.
Find the single highest node in an interval of a dependency graph, ignoring punctuation, coordinations, and prepositions.
the interval within which to search
the Sentence within which to look
the function to adjudicate which is highest when there's a tie
Option containing the highest node index, or None if no such node is found
Finds the highest node (i.e.
Finds the highest node (i.e. closest to a root) in an Interval of a directed graph. If there are multiple nodes of the same rank, all are returned.
an Interval of nodes
a directed graph containing the nodes in span
the single node which is closest to the root among those in span
Finds the highest node (i.e.
Finds the highest node (i.e. closest to a root) in an Interval of a directed graph. If there are multiple nodes of the same rank, all are returned.
Crucially, any node that has an incoming edge from outside the Interval is considered a head. This is efficient if you know your span has a single head that is also within the span.
an Interval of nodes
a directed graph containing the nodes in span
the single node which is closest to the root among those in span
Find the highest nodes in an interval of a dependency graph, ignoring puncutation, coordinations, and prepositions.
Find the highest nodes in an interval of a dependency graph, ignoring puncutation, coordinations, and prepositions. Allows multiple node indices to be "highest" in the case of a tie.
the interval within which to search
the Sentence within which to look
Option containing a sequence of highest node indices, or None if no such node is found
Interval in Sentence sentA
Interval in Sentence sentB
Sentence containing a
Sentence containing b
returns true if Interval a contains Interval b or vice versa
Given an Interval, finds the minimal span covering all of the Interval's nodes' children (recursively).
Given an Interval, finds the minimal span covering all of the Interval's nodes' children (recursively).
Interval of nodes
the sentence over which the interval applies
the minimal Interval that contains all the nodes that are children of span's nodes
Utility functions for use with directed (dependency) graphs User: danebell Date: 2/23/15