Package

epic

parser

Permalink

package parser

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

Type Members

  1. trait AnchoredVisitor[L] extends AnyRef

    Permalink

    A class that asks about all anchored spans.

    A class that asks about all anchored spans. It's the "foreach" version of a epic.parser.GrammarAnchoring that takes in expected counts. score is usually an expected count between 0 and 1.

  2. trait ChartDecoder[L, W] extends Serializable

    Permalink

    A ChartDecoder converts marginals into a binarized tree.

    A ChartDecoder converts marginals into a binarized tree. Post-processing to debinarize and strip useless annotations is still necessary.

  3. case class EPChartFactory[L, W](topology: RuleTopology[L], lexicon: Lexicon[L, W], epInference: EPInference[TreeInstance[L, W], UnrefinedGrammarAnchoring[L, W]]) extends Factory[L, W] with SafeLogging with Product with Serializable

    Permalink

    TODO

  4. trait Grammar[L, W] extends Serializable

    Permalink

    TODO docs

  5. trait GrammarAnchoring[L, W] extends AnyRef

    Permalink

    A GrammarAnchoring is a grammar that has been tuned to a particular sentence (if applicable).

    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.

  6. case class LatentTreeMarginal[L, W](anchoring: GrammarAnchoring[L, W], tree: BinarizedTree[IndexedSeq[(L, Int)]]) extends ParseMarginal[L, W] with Product with Serializable

    Permalink

  7. class MaxConstituentDecoder[L, W] extends ChartDecoder[L, W]

    Permalink

    Attempts to find a parse that maximizes the expected number of correct labels.

    Attempts to find a parse that maximizes the expected number of correct labels. This is Goodman's MaxRecall algorithm.

    L

    label type

    W

    word type

    Annotations
    @SerialVersionUID()
  8. case class MaxRuleProductDecoder[L, W]() extends ProjectingChartDecoder[L, W] with Product with Serializable

    Permalink

    Tries to extract a tree that maximizes rule product in the coarse grammar.

    Tries to extract a tree that maximizes rule product in the coarse grammar. This is Slav's Max-Rule-Product

    Annotations
    @SerialVersionUID()
  9. case class MaxVariationalDecoder[L, W]() extends ProjectingChartDecoder[L, W] with Product with Serializable

    Permalink

    Projects a tree to an anchored PCFG and then does viterbi on that tree.

    Projects a tree to an anchored PCFG and then does viterbi on that tree. This is the Max-Variational method in Matsuzaki

  10. case class NoParseException(msg: String, sentence: IndexedSeq[Any], cause: Throwable = null) extends RuntimeException with ParserException with Product with Serializable

    Permalink
  11. class ParseEval[L] extends AnyRef

    Permalink

    Hack approximation to true parse eval.

    Hack approximation to true parse eval. Gives Labeled Precision and Labeled Recall.

  12. case class ParseExtractionException(msg: String, sentence: IndexedSeq[Any]) extends RuntimeException with ParserException with Product with Serializable

    Permalink
  13. trait ParseMarginal[L, W] extends VisitableMarginal[AnchoredVisitor[L]]

    Permalink

    Represents marginals over trees.

    Represents marginals over trees. Can also extract expected counts

  14. final case class Parser[L, W](topology: RuleTopology[L], lexicon: Lexicon[L, W], constraintsFactory: Factory[L, W], marginalFactory: Factory[L, W], decoder: ChartDecoder[L, W] = ChartDecoder[L, W]())(implicit debinarizer: Debinarizer[L]) extends (IndexedSeq[W]) ⇒ Tree[L] with Product with Serializable

    Permalink

    A Parser produces a syntactic representation of a sentence, called a epic.trees.Tree, which has internal nodes that demarcate syntactic functions

    A Parser produces a syntactic representation of a sentence, called a epic.trees.Tree, which has internal nodes that demarcate syntactic functions

    Annotations
    @SerialVersionUID()
  15. class ParserAnnotator[L] extends StringAnalysisFunction[Token with Sentence, Tree[L]]

    Permalink

    A ParserAnnotator is a slab-ified epic.parser.Parser.

    A ParserAnnotator is a slab-ified epic.parser.Parser. The analogy is that a epic.sequences.Tagger is to epic.sequences.CRF as this class is to epic.parser.Parser.

  16. trait ParserException extends Exception

    Permalink
  17. trait ParserPipeline extends LazyLogging

    Permalink

    ParserPipeline is a base-trait for the parser training pipeline.

    ParserPipeline is a base-trait for the parser training pipeline. Handles reading in the treebank and params and such

  18. class ProductChartFactory[L, W] extends Factory[L, W] with SafeLogging

    Permalink

    TODO

  19. 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

    Permalink

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

    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.

  20. class ProductRefinedFeaturizer[L, W, Feat1, Feat2] extends RefinedFeaturizer[L, W, Either[Feat1, Feat2]]

    Permalink

  21. abstract class ProductRefinementsHandler[L, W] extends AnyRef

    Permalink
  22. final case class ProductUnrefinedGrammarAnchoring[L, W](s1: UnrefinedGrammarAnchoring[L, W], s2: UnrefinedGrammarAnchoring[L, W], alpha: Double = 1.0) extends UnrefinedGrammarAnchoring[L, W] with Product with Serializable

    Permalink

    Creates a product of two epic.parser.UnrefinedGrammarAnchorings (product is in log space, so actually a sum.)

  23. class ProductionFeaturizer[L, L2, W] extends RefinedFeaturizer[L, W, Feature] with Serializable

    Permalink

    A simple Featurizer that just counts lexical and rule productions that are used.

    A simple Featurizer that just counts lexical and rule productions that are used.

    Annotations
    @SerialVersionUID()
  24. abstract class ProjectingChartDecoder[L, W] extends ChartDecoder[L, W]

    Permalink
  25. trait ProjectionsGrammarAnchoring[L, L2, W] extends GrammarAnchoring[L, W]

    Permalink

    TODO

  26. final case class RefinedChartMarginal[L, W](anchoring: GrammarAnchoring[L, W], inside: RefinedParseChart[L], outside: RefinedParseChart[L], logPartition: Double, isMaxMarginal: Boolean) extends ParseMarginal[L, W] with SafeLogging with Product with Serializable

    Permalink

    Holds the information for the marginals for a sentence.

    Holds the information for the marginals for a sentence. That is, the inside and outside scores for a sentence and anchoring.

    L

    the label type

    W

    the word type

    anchoring

    the specialized grammar used to construct the marginals for this sentence

    inside

    inside chart

    outside

    outside chart

    logPartition

    the normalization constant aka inside score of the root aka probability of the sentence

  27. trait RefinedFeaturizer[L, W, Feat] extends AnyRef

    Permalink

  28. class RefinedParseChart[L] extends Serializable

    Permalink
    Annotations
    @SerialVersionUID()
  29. class RuleFeaturizer[L, W] extends RefinedFeaturizer[L, W, Rule[L]]

    Permalink

    A simple Featurizer that just counts lexical and rule productions that are used.

  30. final class RuleTopology[L] extends Encoder[Rule[L]] with Serializable

    Permalink

    A RuleTopology is basically a grammar with no weights.

    A RuleTopology is basically a grammar with no weights. It provides lookup methods by rule, by parent, etc.

    Annotations
    @SerialVersionUID()
  31. final case class SimpleChartMarginal[L, L2, W](anchoring: Anchoring[L, L2, W], inside: SimpleParseChart[L2], outside: SimpleParseChart[L2], isMaxMarginal: Boolean = true) extends ParseMarginal[L, W] with Product with Serializable

    Permalink

    TODO

  32. class SimpleGrammar[L, L2, W] extends Grammar[L, W] with Serializable

    Permalink

    A epic.parser.SimpleGrammar is a grammar where the topology of the grammar (including the refinements) and the scores for the rules does not vary with the input sentence.

    A epic.parser.SimpleGrammar is a grammar where the topology of the grammar (including the refinements) and the scores for the rules does not vary with the input sentence. That is, this is the class for the standard kind of PCFG/WCFG that are normally taught.

    Annotations
    @SerialVersionUID()
  33. final class SimpleParseChart[L] extends Serializable

    Permalink
    Annotations
    @SerialVersionUID()
  34. final class SparseRuleTensor[L] extends Serializable

    Permalink

    This class is mostly an implementation detail.

    This class is mostly an implementation detail. It's used for epic.parser.SimpleGrammar instances to accelerate parsing. It's kind of like a compressed sparse columns matrix (breeze.linalg.CSCMatrix), but it's a 3-d tensor instead of a 2-d matrix.

    Annotations
    @SerialVersionUID()
  35. case class StandardChartFactory[L, W](refinedGrammar: Grammar[L, W], maxMarginal: Boolean = false) extends Factory[L, W] with Product with Serializable

    Permalink
    Annotations
    @SerialVersionUID()
  36. case class TreeMarginal[L, W](anchoring: GrammarAnchoring[L, W], tree: BinarizedTree[(L, Int)]) extends ParseMarginal[L, W] with Product with Serializable

    Permalink

    This isn't really a marginal, except in a degenerate sense.

    This isn't really a marginal, except in a degenerate sense. It gives the likelihood of a known fixed tree under the Anchoring as well as expected counts (i.e. count the occurrences of each rule.)

    anchoring

    The grammar anchoring

    tree

    A tree that has been decorated with the gold refinements at each leaf

  37. trait UnrefinedGrammarAnchoring[L, W] extends GrammarAnchoring[L, W] with Factor[UnrefinedGrammarAnchoring[L, W]]

    Permalink

    epic.parser.UnrefinedGrammarAnchoring score rules and labels in a particular context without needed extra "refined" categories.

    epic.parser.UnrefinedGrammarAnchoring score rules and labels in a particular context without needed extra "refined" categories. That is, an anchoring can score x-bar spans in a particular context.

    Annotations
    @SerialVersionUID()
  38. case class ViterbiDecoder[L, W]() extends ChartDecoder[L, W] with Serializable with SafeLogging with Product

    Permalink

    Tries to extract a tree that maximizes log score.

    Tries to extract a tree that maximizes log score.

    Annotations
    @SerialVersionUID()

Value Members

  1. object ChartDecoder extends Serializable

    Permalink
  2. object EPChartFactory extends Serializable

    Permalink
  3. object GenerativeParser

    Permalink

    Contains codes to read off parsers and grammars from a treebank.

  4. object GenerativeTrainer extends ParserPipeline

    Permalink
  5. object Grammar extends Serializable

    Permalink
  6. object GrammarAnchoring

    Permalink
  7. object LatentTreeMarginal extends Serializable

    Permalink
  8. object ParseEval extends LazyLogging

    Permalink
  9. object ParseMarginal

    Permalink
  10. object ParseText extends ProcessTextMain[Parser[AnnotatedLabel, String], Tree[AnnotatedLabel]]

    Permalink

    Simple class that reads in a bunch of files and parses them.

    Simple class that reads in a bunch of files and parses them. Output is dumped to standard out.

  11. object Parser extends Serializable

    Permalink
  12. object ParserParams

    Permalink

    Mostly a utility class for parsertrainers.

  13. object ParserTester

    Permalink

    ParserTester just tests a grammar reading in the treebank and params and such

  14. object RefinedChartMarginal extends Serializable

    Permalink
  15. object RefinedParseChart extends Serializable

    Permalink
  16. object RuleTopology extends Serializable

    Permalink
  17. object SimpleChartMarginal extends Serializable

    Permalink
  18. object SimpleGrammar extends Serializable

    Permalink
  19. object SparseRuleTensor extends Serializable

    Permalink
  20. object TinyRuleTest extends App

    Permalink

    TODO

  21. object TinyRuleTestRedux extends App

    Permalink
  22. object TreeMarginal extends Serializable

    Permalink
  23. object UnrefinedGrammarAnchoring

    Permalink
  24. package kbest

    Permalink
  25. package models

    Permalink
  26. package morph

    Permalink
  27. package projections

    Permalink
  28. package repl

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped