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.
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.
TODO
TODO docs
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.
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.
label type
word type
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
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
Hack approximation to true parse eval.
Hack approximation to true parse eval. Gives Labeled Precision and Labeled Recall.
Represents marginals over trees.
Represents marginals over trees. Can also extract expected counts
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
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.
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
TODO
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.
Creates a product of two epic.parser.UnrefinedGrammarAnchorings (product is in log space, so actually a sum.)
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.
TODO
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.
the label type
the word type
the specialized grammar used to construct the marginals for this sentence
inside chart
outside chart
the normalization constant aka inside score of the root aka probability of the sentence
A simple Featurizer that just counts lexical and rule productions that are used.
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.
TODO
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.
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.
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.)
The grammar anchoring
A tree that has been decorated with the gold refinements at each leaf
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.
Tries to extract a tree that maximizes log score.
Tries to extract a tree that maximizes log score.
Contains codes to read off parsers and grammars from a treebank.
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.
Mostly a utility class for parsertrainers.
ParserTester just tests a grammar reading in the treebank and params and such
TODO