Trait/Object

epic.parser

GrammarAnchoring

Related Docs: object GrammarAnchoring | package parser

Permalink

trait GrammarAnchoring[L, W] extends AnyRef

A GrammarAnchoring is a grammar that has been tuned to a particular sentence (if applicable). It knows how to do two things: assign scores to rules and spans, and determine reachability of various refinements.

It might be nice to consider a refined grammar that doesn't need sentence-specific tuning, but that interferes with integrating lexicalization into the framework.

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

Abstract Value Members

  1. abstract def addConstraints(constraints: ChartConstraints[L]): GrammarAnchoring[L, W]

    Permalink
  2. abstract def childRefinement(rule: Int, ruleRef: Int): Int

    Permalink
  3. abstract def leftChildRefinement(rule: Int, ruleRef: Int): Int

    Permalink
  4. abstract def lexicon: Lexicon[L, W]

    Permalink
  5. abstract def numValidRefinements(label: Int): Int

    Permalink
  6. abstract def numValidRuleRefinements(rule: Int): Int

    Permalink
  7. abstract def parentRefinement(rule: Int, ruleRef: Int): Int

    Permalink
  8. abstract def rightChildRefinement(rule: Int, ruleRef: Int): Int

    Permalink
  9. abstract def ruleRefinementFromRefinements(r: Int, refA: Int, refB: Int, refC: Int): Int

    Permalink

    Returns the refined rule given parent and child refinements for a unary rule.

    Returns the refined rule given parent and child refinements for a unary rule. May return -1 if no such rule is allowed.

    r

    rule Index

    refA

    parent index

    refB

    left child index

    refC

    right child index

    returns

    rule refinement id, or -1 if rule is not allowed with those refinements

  10. abstract def ruleRefinementFromRefinements(r: Int, refA: Int, refB: Int): Int

    Permalink

    Returns the refined rule given parent and child refinements for a unary rule.

    Returns the refined rule given parent and child refinements for a unary rule. May return -1 if no such rule is allowed.

    r

    rule index

    refA

    parent index

    refB

    child index

    returns

    rule refinement id, or -1 if rule is not allowed with those refinements

  11. abstract def scoreBinaryRule(begin: Int, split: Int, end: Int, rule: Int, ref: Int): Double

    Permalink

    Scores the indexed epic.trees.BinaryRule rule when it occurs at (begin, split, end)

  12. abstract def scoreSpan(begin: Int, end: Int, label: Int, ref: Int): Double

    Permalink

    Scores the indexed label rule with refinenemnt ref, when it occurs at (begin, end).

    Scores the indexed label rule with refinenemnt ref, when it occurs at (begin, end). Can be used for s, or for a "bottom" label. Mainly used for s.

  13. abstract def scoreUnaryRule(begin: Int, end: Int, rule: Int, ref: Int): Double

    Permalink

    Scores the indexed epic.trees.UnaryRule rule when it occurs at (begin, end)

  14. abstract def sparsityPattern: ChartConstraints[L]

    Permalink
  15. abstract def topology: RuleTopology[L]

    Permalink
  16. abstract def validCoarseRulesGivenParentRefinement(a: Int, refA: Int): Array[Int]

    Permalink
  17. abstract def validLabelRefinements(begin: Int, end: Int, label: Int): Array[Int]

    Permalink

    For a given span, what refinements to the label are allowed? Refinements in general are in the range (0, numValidRefinements).

    For a given span, what refinements to the label are allowed? Refinements in general are in the range (0, numValidRefinements). This method may return a subset.

    returns

    array of valid refinements. Don't modify!

  18. abstract def validLeftChildRefinementsGivenRule(begin: Int, end: Int, completionBegin: Int, completionEnd: Int, rule: Int): Array[Int]

    Permalink
  19. abstract def validParentRefinementsGivenRule(begin: Int, splitBegin: Int, splitEnd: Int, end: Int, rule: Int): Array[Int]

    Permalink
  20. abstract def validRightChildRefinementsGivenRule(completionBegin: Int, completionEnd: Int, begin: Int, end: Int, rule: Int): Array[Int]

    Permalink
  21. abstract def validRuleRefinementsGivenLeftChild(begin: Int, split: Int, completionBegin: Int, completionEnd: Int, rule: Int, childRef: Int): Array[Int]

    Permalink
  22. abstract def validRuleRefinementsGivenParent(begin: Int, end: Int, rule: Int, parentRef: Int): Array[Int]

    Permalink

    For a given span and the parent's refinement, what refinements to the rule are allowed?

  23. abstract def validRuleRefinementsGivenRightChild(completionBegin: Int, completionEnd: Int, split: Int, end: Int, rule: Int, childRef: Int): Array[Int]

    Permalink
  24. abstract def validUnaryRuleRefinementsGivenChild(begin: Int, end: Int, rule: Int, childRef: Int): Array[Int]

    Permalink
  25. abstract def words: IndexedSeq[W]

    Permalink

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def *(other: UnrefinedGrammarAnchoring[L, W]): GrammarAnchoring[L, W]

    Permalink
  4. def *(other: GrammarAnchoring[L, W]): GrammarAnchoring[L, W]

    Permalink

    Computes the pointwise product of two grammars, augmenting their refinement space to reflect this.

    Computes the pointwise product of two grammars, augmenting their refinement space to reflect this. If they share the same annotationTag, (assuming it's non-negative) they will share their state space. (That is, they will have the same annotations.)

  5. def /(other: GrammarAnchoring[L, W]): GrammarAnchoring[L, W]

    Permalink

    Computes the pointwise division of two grammars, augmenting their refinement space to reflect this.

    Computes the pointwise division of two grammars, augmenting their refinement space to reflect this. If they share the same annotationTag, (assuming it's non-negative) they will share their state space. (That is, they will have the same annotations.)

  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. def annotationTag: Int

    Permalink

    The annotationTag controls if two grammars are over the same refinements.

    The annotationTag controls if two grammars are over the same refinements. If they are, then * and / can be much faster.

    Note that 0 is reserved for unrefined anchorings, and -1 never matches other tags.

    Reserved: 1 - Lexicalized Parsers with no symbol or rule annotation

    0's will be optimized

  8. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  14. def isConvergedTo(f: GrammarAnchoring[L, W], diff: Double): Boolean

    Permalink
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. def length: Int

    Permalink
  17. def logPartition: Double

    Permalink
  18. def marginal: RefinedChartMarginal[L, W]

    Permalink
  19. def maxLabelRefinements: Int

    Permalink
  20. def maxMarginal: RefinedChartMarginal[L, W]

    Permalink
  21. final def ne(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def tagConstraints: TagConstraints[L]

    Permalink
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. def validRuleRefinementsGivenParent(begin: Int, splitBegin: Int, splitEnd: Int, end: Int, rule: Int, parentRef: Int): Array[Int]

    Permalink
  28. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(): Unit

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

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped