Object

org.clulab.reach.utils

DependencyUtils

Related Doc: package utils

Permalink

object DependencyUtils

Utility functions for use with directed (dependency) graphs User: danebell Date: 2/23/15

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DependencyUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val defaultPolicy: (Seq[Int]) ⇒ Int

    Permalink
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def findHead(span: Interval, graph: DirectedGraph[String], chooseWhich: (Seq[Int]) ⇒ Int = defaultPolicy): Int

    Permalink

    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.

    span

    an Interval of nodes

    graph

    a directed graph containing the nodes in span

    chooseWhich

    a function deciding which of multiple heads is returned; the rightmost head selected by default

    returns

    the single node which is closest to the root among those in span

  11. def findHeadLocal(span: Interval, graph: DirectedGraph[String], chooseWhich: (Seq[Int]) ⇒ Int = defaultPolicy): Int

    Permalink

    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.

    span

    an Interval of nodes

    graph

    a directed graph containing the nodes in span

    chooseWhich

    a function deciding which of multiple heads is returned; the rightmost head selected by default

    returns

    the single node which is closest to the root among those in span

  12. def findHeadStrict(span: Interval, sent: Sentence, chooseWhich: (Seq[Int]) ⇒ Int = defaultPolicy): Option[Int]

    Permalink

    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.

    span

    the interval within which to search

    sent

    the Sentence within which to look

    chooseWhich

    the function to adjudicate which is highest when there's a tie

    returns

    Option containing the highest node index, or None if no such node is found

  13. def findHeads(span: Interval, graph: DirectedGraph[String]): Seq[Int]

    Permalink

    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.

    span

    an Interval of nodes

    graph

    a directed graph containing the nodes in span

    returns

    the single node which is closest to the root among those in span

  14. def findHeadsLocal(span: Interval, graph: DirectedGraph[String]): Seq[Int]

    Permalink

    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.

    span

    an Interval of nodes

    graph

    a directed graph containing the nodes in span

    returns

    the single node which is closest to the root among those in span

  15. def findHeadsStrict(span: Interval, sent: Sentence): Seq[Int]

    Permalink

    Find the highest nodes in an interval of a dependency graph, ignoring punctuation, coordinations, and prepositions.

    Find the highest nodes in an interval of a dependency graph, ignoring punctuation, coordinations, and prepositions. Allows multiple node indices to be "highest" in the case of a tie.

    span

    the interval within which to search

    sent

    the Sentence within which to look

    returns

    Option containing a sequence of highest node indices, or None if no such node is found

  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def nested(a: Interval, b: Interval, sentA: Sentence, sentB: Sentence): Boolean

    Permalink

    a

    Interval in Sentence sentA

    b

    Interval in Sentence sentB

    sentA

    Sentence containing a

    sentB

    Sentence containing b

    returns

    returns true if Interval a contains Interval b or vice versa

  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def subgraph(span: Interval, sent: Sentence): Option[Interval]

    Permalink

    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).

    span

    Interval of nodes

    sent

    the sentence over which the interval applies

    returns

    the minimal Interval that contains all the nodes that are children of span's nodes

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped