Class

epic.parser

ProductGrammarAnchoring

Related Doc: package parser

Permalink

final case class ProductGrammarAnchoring[L, W](s1: GrammarAnchoring[L, W], s2: GrammarAnchoring[L, W], alpha: Double = 1.0) extends ProductRefinementsHandler[L, W] with GrammarAnchoring[L, W] with Product with Serializable

Creates a product of two derivation scorers, seamlessly combining their refinements as appropriate.

This class is the main motivation for the "annotationTag" on epic.parser.GrammarAnchoring instances. If one of the annotation tags is "0" then it does not use refinements, and so we can avoid clever games.

Similarly, if the tags matched, then we can use the same tags. I'm not 100% convinced this is necessary any more. But I have it for now.

Linear Supertypes
Serializable, Serializable, Product, Equals, GrammarAnchoring[L, W], ProductRefinementsHandler[L, W], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProductGrammarAnchoring
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. GrammarAnchoring
  7. ProductRefinementsHandler
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ProductGrammarAnchoring(s1: GrammarAnchoring[L, W], s2: GrammarAnchoring[L, W], alpha: Double = 1.0)

    Permalink

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
    Definition Classes
    GrammarAnchoring
  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.)

    Definition Classes
    GrammarAnchoring
  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.)

    Definition Classes
    GrammarAnchoring
  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. def addConstraints(constraints: ChartConstraints[L]): GrammarAnchoring[L, W]

    Permalink
  8. val alpha: Double

    Permalink
  9. 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

    Definition Classes
    ProductGrammarAnchoringGrammarAnchoring
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def childRefinement(rule: Int, ruleRef: Int): Int

    Permalink
  12. def clone(): AnyRef

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

    Permalink
    Definition Classes
    AnyRef
  14. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    GrammarAnchoring
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def label1Ref(label: Int, ref: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    ProductRefinementsHandler
    Annotations
    @inline()
  18. final def label2Ref(label: Int, ref: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    ProductRefinementsHandler
    Annotations
    @inline()
  19. def leftChildRefinement(rule: Int, ruleRef: Int): Int

    Permalink
  20. def length: Int

    Permalink
    Definition Classes
    GrammarAnchoring
  21. def lexicon: Lexicon[L, W]

    Permalink
  22. def logPartition: Double

    Permalink
    Definition Classes
    GrammarAnchoring
  23. def marginal: RefinedChartMarginal[L, W]

    Permalink
    Definition Classes
    GrammarAnchoring
  24. def maxLabelRefinements: Int

    Permalink
    Definition Classes
    GrammarAnchoring
  25. def maxMarginal: RefinedChartMarginal[L, W]

    Permalink
    Definition Classes
    GrammarAnchoring
  26. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  29. def numValidRefinements(label: Int): Int

    Permalink
  30. def numValidRuleRefinements(rule: Int): Int

    Permalink
  31. def parentRefinement(rule: Int, ruleRef: Int): Int

    Permalink
  32. final val refinementController: GrammarAnchoring[L, W]

    Permalink
    Attributes
    protected
    Definition Classes
    ProductRefinementsHandler
  33. def rightChildRefinement(rule: Int, ruleRef: Int): Int

    Permalink
  34. final def rule1Ref(rule: Int, ref: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    ProductRefinementsHandler
    Annotations
    @inline()
  35. final def rule2Ref(rule: Int, ref: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    ProductRefinementsHandler
    Annotations
    @inline()
  36. 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

    Definition Classes
    ProductGrammarAnchoringGrammarAnchoring
  37. 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

    Definition Classes
    ProductGrammarAnchoringGrammarAnchoring
  38. val s1: GrammarAnchoring[L, W]

    Permalink
  39. val s2: GrammarAnchoring[L, W]

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

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

    Definition Classes
    ProductGrammarAnchoringGrammarAnchoring
  41. 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.

    Definition Classes
    ProductGrammarAnchoringGrammarAnchoring
  42. 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)

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

    Definition Classes
    ProductGrammarAnchoringGrammarAnchoring
  43. val sparsityPattern: ChartConstraints[L]

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

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

    Permalink
    Definition Classes
    GrammarAnchoring
  46. val topology: RuleTopology[L]

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

    Permalink
  48. 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!

    Definition Classes
    ProductGrammarAnchoringGrammarAnchoring
  49. def validLeftChildRefinementsGivenRule(begin: Int, end: Int, completionBegin: Int, completionEnd: Int, rule: Int): Array[Int]

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

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

    Permalink
  52. def validRuleRefinementsGivenLeftChild(begin: Int, split: Int, completionBegin: Int, completionEnd: Int, rule: Int, leftChildRef: Int): Array[Int]

    Permalink
  53. 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?

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

    Definition Classes
    ProductGrammarAnchoringGrammarAnchoring
  54. def validRuleRefinementsGivenParent(begin: Int, splitBegin: Int, splitEnd: Int, end: Int, rule: Int, parentRef: Int): Array[Int]

    Permalink
    Definition Classes
    GrammarAnchoring
  55. def validRuleRefinementsGivenRightChild(completionBegin: Int, completionEnd: Int, split: Int, end: Int, rule: Int, rightChildRef: Int): Array[Int]

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def words: IndexedSeq[W]

    Permalink

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 Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from GrammarAnchoring[L, W]

Inherited from ProductRefinementsHandler[L, W]

Inherited from AnyRef

Inherited from Any

Ungrouped