Class/Object

epic.parser.projections

OracleParser

Related Docs: object OracleParser | package projections

Permalink

class OracleParser[L, L2, W] extends SerializableLogging

Finds the best tree (relative to the gold tree) s.t. it's reacheable given the current anchoring. Best is measured as number of correct labeled spans, as usual. If the given treebank symbol is correct, bonus points can be awarded for getting the right refinement.

On the training set, the "best" reachable tree will not always (~5% of the time) be the correct tree, because pruning will remove the right answer. We don't want to try to train towards an unreachable tree, because the training algorithm will do bad things. Instead, we want the best possible tree that our parser could conceivably produce. That is why this class exists.

If backupGrammar is provided, it will be used to find such a tree in the case that no tree can be found with grammar (given the current constraints).

Typically, the first grammar will be a treebank grammar that has no horizontal markovization (i.e. it is not forgetfully binarized) and it also remembers the functional tags like -TMP. The backup grammar is usually the grammar with which the pruning masks were produced; because of the way we prune, that parser will always be able to find a tree (assuming that it was able to find a tree without pruning.)

TODO: should be a cascade of grammars

Linear Supertypes
SerializableLogging, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OracleParser
  2. SerializableLogging
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OracleParser(grammar: SimpleGrammar[L, L2, W], backupGrammar: Optional[SimpleGrammar[L, L2, W]] = None)

    Permalink

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
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  8. def forTree(tree: BinarizedTree[L2], words: IndexedSeq[W], constraints: ChartConstraints[L]): BinarizedTree[L2]

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

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. val grammar: SimpleGrammar[L, L2, W]

    Permalink
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. def logger: LazyLogger

    Permalink
    Attributes
    protected
    Definition Classes
    SerializableLogging
  14. def makeGoldPromotingAnchoring(grammar: SimpleGrammar[L, L2, W], w: IndexedSeq[W], tree: BinarizedTree[L2], treeconstraints: ChartConstraints[L], constraints: ChartConstraints[L]): GrammarAnchoring[L, W]

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  18. def oracleMarginalFactory(trees: IndexedSeq[TreeInstance[L2, W]]): Factory[L, W]

    Permalink
  19. def oracleParser(constraintGrammar: Factory[L, W], trees: IndexedSeq[TreeInstance[L2, W]])(implicit deb: Debinarizer[L]): Parser[L, W]

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. 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 SerializableLogging

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped