Package opennlp.tools.depparse
package opennlp.tools.depparse
-
ClassDescriptionOne step of arc-standard beam search over a
FeedforwardNetwork, shared by beam decoding and beam refinement: every node of the beam is expanded by each applicable transition scored by summed log-probability, and the best expansions are advanced.One path of the beam.Converts an annotated dependency tree into the sequence of parser transitions needed to reconstruct it.Tracks the state of an arc-standard dependency parse: a stack of tokens being processed, a buffer of unread tokens, and the dependency arcs created so far.Accumulates the unlabeled and labeled attachment scores over all tokens and over the tokens that are not punctuation.Caches the hidden-layer contribution of each (feature position, embedding row) pair aFeedforwardDependencyParserscores, within a byte budget.One labeled edge of aDependencyTree: the token atdependentis governed by the token atheadunder the givenrelation.Generates the classification features for one arc-standard configuration: words and tags of the topmost stack and frontmost buffer positions, their pairings, the partial structure built so far (tags and relations of the leftmost and rightmost dependents, valency counts), and a bucketed distance between stack top and buffer front.Cross validator forDependencyParserME.A marker interface for evaluatingdependency parsers.Measures the quality of aDependencyParseragainst goldsampleswith the two standard scores: the unlabeled attachment score (UAS, the fraction of tokens with the correct head) and the labeled attachment score (LAS, the fraction of tokens with the correct head and relation label).Turnssamplesinto trainingevents: for each sample theArcStandardOraclederives the gold transitions, and every transition becomes one event pairing the configuration features with the encoded transition.The persisted form of a trainedDependencyParserME: the transition classification model plus the standard model manifest, serialized and loaded through the sameBaseModelmachinery as every other tool model.The interface for dependency parsers, which assign every token of a sentence a syntactic head and a relation label, forming a single-rooted tree over the sentence.A greedy transition-basedDependencyParser: a classifier picks the next arc-standardTransitionfor each configuration until the parse is complete, always taking the highest scoring transition that is applicable.One dependency-annotated sentence: tokens, their part-of-speech tags, and the goldDependencyTreeover them.An immutable dependency tree over one sentence: for every token, the index of its head and the label of the relation to that head.The feature template of the feedforward parser for one sentence: a fixed set of configuration positions whose words, tags, and arc labels are embedded and concatenated into the network input, following Chen and Manning (2014).The persisted form of a trainedFeedforwardDependencyParser: the network weights plus the standard model manifest, serialized and loaded through the sameBaseModelmachinery as every other tool model.The neuralDependencyParser: an arc-standard decoder over theFeedforwardDependencyModel.Trains theFeedforwardDependencyModel: oracle-derived transition examples, minibatch AdaGrad over a softmax cross-entropy loss, cube activation, and inverted dropout on the hidden layer, the training recipe of Chen and Manning (2014).A projective training sample with its arc-standard oracle derivation.The forward pass, backward pass, gradient buffers, and AdaGrad state shared by local training and beam refinement.The parsed hyperparameters of one training or refinement run.The weights of the feedforward transition parser: embeddings for words, tags, and arc labels, one hidden layer with cube activation, and a transition output layer, after Chen and Manning (2014).Reads and writes a network as aFeedforwardDependencyModelartifact: a four-byte magic, anintformat version, the three vocabularies, the transition inventory, the embedding size, and the weight matrices and vectors.One action of the arc-standard transition system: shift the next buffer token onto the stack, or attach one of the two topmost stack tokens to the other under a relation label.The kinds of arc-standard action.