Object

org.clulab.utils

ToEnhancedDependencies

Related Doc: package utils

Permalink

object ToEnhancedDependencies

Converts Stanford basic dependencies to collapsed ones This follows the rules from http://universaldependencies.org/u/overview/enhanced-syntax.html (this applies to both Stanford basic deps and universal basic ones) We support: - Collapsing of prepositions to the prep_* (or nmod_*) label - Controlled/raised subjects - Propagating subjects and objects in conjoined verbs - Propagating conjoined subjects and objects to same verb - Pushing subjects/objects inside relative clauses User: mihais Date: 8/1/17

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ToEnhancedDependencies
  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. def collapsePrepositionsStanford(sentence: Sentence, dgi: DirectedGraphIndex[String]): Unit

    Permalink

    Collapses prep + pobj into prep_x (Stanford dependencies) Mary gave a book to Jane => prep_to from 1 to 5

    Collapses prep + pobj into prep_x (Stanford dependencies) Mary gave a book to Jane => prep_to from 1 to 5

    sentence

    The sentence to operate on

    dgi

    The directed graph of collapsed dependencies at this stage

  7. def collapsePrepositionsUniversal(sentence: Sentence, dgi: DirectedGraphIndex[String]): Seq[(Int, Int, String)]

    Permalink

    Collapses nmod + case into nmod_x (universal dependencies) Mary gave a book to Jane => nmod_to from 1 to 5 There was famine due to drought => nmod_due_to from 2 to 5

    Collapses nmod + case into nmod_x (universal dependencies) Mary gave a book to Jane => nmod_to from 1 to 5 There was famine due to drought => nmod_due_to from 2 to 5

    sentence

    The sentence to operate on

    dgi

    The directed graph of collapsed dependencies at this stage

  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def expandConj(sentence: Sentence, dgi: DirectedGraphIndex[String]): Unit

    Permalink

    Collapses conj and cc into conj_CCWORD John and Mary ate cake => conj_and from 0 to 2

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def findMultiWord(first: String, firstPos: Int, sentence: Sentence, dgi: DirectedGraphIndex[String]): String

    Permalink
  13. def generateStanfordEnhancedDependencies(sentence: Sentence, dg: DirectedGraph[String]): DirectedGraph[String]

    Permalink
  14. def generateUniversalEnhancedDependencies(sentence: Sentence, dg: DirectedGraph[String]): DirectedGraph[String]

    Permalink
  15. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  18. def mergeNsubjXcomp(dgi: DirectedGraphIndex[String]): Unit

    Permalink

    nsubj + xcomp => nsubj:xsubj Disagreements over land rights for crop cultivation and livestock grazing continue to be a major source of conflict.

    nsubj + xcomp => nsubj:xsubj Disagreements over land rights for crop cultivation and livestock grazing continue to be a major source of conflict. => nsubj:xsubj from "Disagreements" to "source"

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  22. def propagateConjSubjectsAndObjects(sentence: Sentence, dgi: DirectedGraphIndex[String]): Unit

    Permalink

    Propagates conjoined subjects and objects to same verb (works for SD and UD) Paul and Mary are reading a book => nsubj from 4 to 0 and from 4 to 2 John is reading a book and a newspaper => dobj from 2 to 4 and from 2 to 7

    Propagates conjoined subjects and objects to same verb (works for SD and UD) Paul and Mary are reading a book => nsubj from 4 to 0 and from 4 to 2 John is reading a book and a newspaper => dobj from 2 to 4 and from 2 to 7

    sentence

    The sentence to operate on

    dgi

    The directed graph of collapsed dependencies at this stage

  23. def propagateSubjectsAndObjectsInConjVerbs(sentence: Sentence, dgi: DirectedGraphIndex[String], universal: Boolean): Unit

    Permalink

    Propagates subjects/objects between conjoined verbs (works for both SD and UD) The store buys and sells cameras => nsubj from 2 to 1 and from 4 to 1; dobj from 2 to 5 and from 4 to 5

    Propagates subjects/objects between conjoined verbs (works for both SD and UD) The store buys and sells cameras => nsubj from 2 to 1 and from 4 to 1; dobj from 2 to 5 and from 4 to 5

    sentence

    The sentence to operate on

    dgi

    The directed graph of collapsed dependencies at this stage

  24. def pushSubjectsObjectsInsideRelativeClauses(sentence: Sentence, dgi: DirectedGraphIndex[String], universal: Boolean): Unit

    Permalink

    Propagates subjects and objects inside relative clauses (works for both SD and UD) The boy who lived => nsubj from 3 to 1 the book, which I read, was great.

    Propagates subjects and objects inside relative clauses (works for both SD and UD) The boy who lived => nsubj from 3 to 1 the book, which I read, was great. => dobj from 5 to 1

    sentence

    The sentence to operate on

    dgi

    The directed graph of collapsed dependencies at this stage

  25. def raiseSubjects(dgi: DirectedGraphIndex[String]): Unit

    Permalink

    Pushes subjects inside xcomp clauses (works for both SD and UD) Mary wants to buy a book => nsubj from 3 to 0

    Pushes subjects inside xcomp clauses (works for both SD and UD) Mary wants to buy a book => nsubj from 3 to 0

    dgi

    The directed graph of collapsed dependencies at this stage

  26. def replicateCollapsedNmods(collapsedNmods: Seq[(Int, Int, String)], dgi: DirectedGraphIndex[String]): Unit

    Permalink

    Replicates nmod_* accross conj dependencies economic decline has led to violence and displacement => nmod_to from "led" to both "violence" and "displacement"

  27. def replicateCopulativeSubjects(sentence: Sentence, dgi: DirectedGraphIndex[String]): Unit

    Permalink

    Replicates copulative subjects across conjunctions It is difficult and expensive => nsubj from 2 to 0 and from 4 to 0

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped