p

epic

trees

package trees

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. case class AnnotatedLabel (label: String, headTag: Option[String] = None, parents: IndexedSeq[String] = IndexedSeq.empty, siblings: IndexedSeq[Either[String, String]] = IndexedSeq.empty, features: Set[Annotation] = Set.empty, index: Int = 1) extends Feature with CachedHashCode with Product with Serializable

    The standard label used in the parser (used to be String).

    The standard label used in the parser (used to be String).

    Useful for Klein-and-Manning style annotated labels and other explicit-annotation strategies

    Annotations
    @SerialVersionUID()
  2. trait Annotation extends Serializable

    Something we can throw in an AnnotatedLabel

    Something we can throw in an AnnotatedLabel

    Annotations
    @SerialVersionUID()
  3. sealed trait BinarizedTree [+L] extends Tree[L]
  4. final case class BinaryRule [+L](parent: L, left: L, right: L) extends Rule[L] with Product with Serializable
    Annotations
    @SerialVersionUID()
  5. case class BinaryTree [+L](label: L, leftChild: BinarizedTree[L], rightChild: BinarizedTree[L], span: Span) extends BinarizedTree[L] with Product with Serializable
  6. trait Debinarizer [L] extends (BinarizedTree[L]) ⇒ Tree[L] with Serializable

    Class that turns BinarizedTrees into normal trees.

    Class that turns BinarizedTrees into normal trees. Should replace unary chains in addition to removing intermediates.

  7. case class DependencyTree [+L, +W](dependencies: IndexedSeq[(L, Int)], words: IndexedSeq[W]) extends Product with Serializable

    root index is words.length

  8. case class FunctionalTag (tag: String) extends Annotation with Product with Serializable
  9. case class HeadDB [B](symbolArityHeadChildCounts: Counter2[(B, Int), Int, Int], ruleHeadChildCounts: Counter2[(B, Seq[B]), Int, Int], defaultToLeft: Boolean = true) extends Product with Serializable
  10. trait HeadFinder [L] extends AnyRef
  11. case class HeadRule [L](dir: Dir, dis: Boolean, heads: Seq[L]) extends Product with Serializable

    Based on Aria's comments:

    Based on Aria's comments:

    Basically, you're looking for the head label by searching in Dir for each parent -> rule expansion.

    Dir is whether or not to look left to right or right to left Dis determines whether you are looking for the first match of any of the categories, or if you're looking for any match of the first category, then the second, etc. etc.

  12. trait HeadRules [L] extends Serializable
    Annotations
    @SerialVersionUID()
  13. final case class LexicalProduction [+L, +W](parent: L, word: W) extends Production[L, W] with Product with Serializable
  14. case class NaryTree [L](label: L, children: IndexedSeq[Tree[L]], span: Span) extends Tree[L] with Product with Serializable
  15. case class NullRule [+L](parent: L) extends Production[L, Nothing] with Product with Serializable
  16. case class NullaryTree [+L](label: L, span: Span) extends BinarizedTree[L] with Product with Serializable
  17. case class PartialTreeProcessor () extends Product with Serializable
  18. class PennTreeReader extends Iterator[(Tree[String], IndexedSeq[String])]

    PennTreeReader due to Adam Pauls.

    PennTreeReader due to Adam Pauls.

    This reader returns empty categories as leaves of the tree below the -NONE-. These leaves span 0 words.

    For example, (TOP (S-IMP (NP-SBJ (-NONE- *PRO*)) (VP (VB Look) (PP-DIR (IN at) (NP (DT that)))) (. /.)))

    will return (TOP[0:4] (S-IMP[0:4] (NP-SBJ[0:0] (-NONE-[0:0] (*PRO*[0:0]))) (VP[0:4]...)

  19. case class ProcessedTreebank (path: File, maxLength: Int = 10000, includeDevInTrain: Boolean = false, binarization: String = "head", treebankType: String = "penn", numSentences: Int = Int.MaxValue, keepUnaryChainsFromTrain: Boolean = true, debuckwalterize: Boolean = false, supervisedHeadFinderPtbPath: String = "", supervisedHeadFinderConllPath: String = "") extends Product with Serializable

    Represents a treebank with attendant spans, binarization, etc.

    Represents a treebank with attendant spans, binarization, etc. Used in all the parser trainers.

    Annotations
    @Help()
  20. sealed trait Production [+L, +W] extends Feature
  21. sealed trait Rule [+L] extends Production[L, Nothing]
  22. class RuleBasedHeadFinder [L] extends HeadFinder[L] with Serializable

    Can annotate a tree with the head word.

    Can annotate a tree with the head word. Usually you should just use HeadFinder.collinsHeadFinder

    Annotations
    @SerialVersionUID()
  23. class SimpleTreebank extends Treebank[String]

    A SimpleTreebank can be easily specified by paths to the trees in Penn treebank format

  24. final class Span extends AnyVal with Serializable
  25. case class StandardTreeProcessor (headFinder: HeadFinder[AnnotatedLabel] = HeadFinder.collins, removeTraces: Boolean = true) extends (Tree[AnnotatedLabel]) ⇒ BinarizedTree[AnnotatedLabel] with Product with Serializable

  26. class SubsampledTreebank extends Treebank[String]

    A Treebank that uses a few number of training and test sentences.

  27. class SupervisedHeadFinder [L] extends HeadFinder[L]
  28. trait SupervisedHeadFinderInnards [L, B] extends Serializable
  29. class TraceRemover [T, W] extends (Tree[T]) ⇒ Tree[T]

    Removes all traces from the word sequence, deleting all empty categories while it's at it.

  30. class TraceToSlashCategoryConverter extends (Tree[AnnotatedLabel]) ⇒ Tree[AnnotatedLabel]

    Removes traces from the word sequence, and makes the tree have empty spans

  31. trait Tree [+L] extends Serializable
    Annotations
    @SerialVersionUID()
  32. case class TreeInstance [L, +W](id: String, tree: BinarizedTree[L], words: IndexedSeq[W]) extends Example[BinarizedTree[L], IndexedSeq[W]] with Product with Serializable
  33. trait Treebank [L] extends AnyRef

    A Treebank contains a train set, a test set, and a dev set, which are "Portions".

    A Treebank contains a train set, a test set, and a dev set, which are "Portions". Portions are made up of sections, which have the trees.

  34. final case class UnaryRule [+L](parent: L, child: L, chain: IndexedSeq[String]) extends Rule[L] with Product with Serializable
    Annotations
    @SerialVersionUID()
  35. case class UnaryTree [+L](label: L, child: BinarizedTree[L], chain: IndexedSeq[String], span: Span) extends BinarizedTree[L] with Product with Serializable

Value Members

  1. object AnnotatedLabel extends Serializable
  2. object BinaryRule extends Serializable
  3. object Debinarizer extends Serializable
  4. object DependencyTree extends Serializable
  5. object HeadFinder

    Implements HeadFinding as in the Collins parser.

    Implements HeadFinding as in the Collins parser. You can use HeadFinder.left[L] or right[L] to not use any head rules

    Based on Aria's code.

  6. object HeadRules extends Serializable
  7. object SimpleTreebank
  8. object Span extends Serializable
  9. object StandardTreeProcessor extends Serializable
  10. object SupervisedHeadFinder
  11. object SupervisedHeadFinderInnards extends Serializable
  12. object TraceToSlashCategoryConverter
  13. object Tree extends Serializable
  14. object Treebank
  15. object Trees
  16. object TstTreebank

  17. object UnaryChainCollapser

    Removes unaries chains A -> B -> ...

    Removes unaries chains A -> B -> ... -> C, replacing them with A -> C and modifying the tree to know about the unaries

  18. object UnaryRule extends Serializable

Ungrouped