org.allenai.nlpstack.parse.poly

fsm

package fsm

Visibility
  1. Public
  2. All

Type Members

  1. abstract class ClassificationTask extends AnyRef

    A ClassificationTask specifies a particular classification task for which we want to collect feature vectors and train a classifier.

    A ClassificationTask specifies a particular classification task for which we want to collect feature vectors and train a classifier.

    In practice, feature vectors will be tagged with their ClassificationTask, allowing us to easily sort a mixed set of feature vectors according to their relevant ClassificationTask, before training the respective classifiers.

  2. case class ClassifierBasedCostFunction(transitionSystem: TransitionSystem, transitions: IndexedSeq[StateTransition], taskClassifierList: List[(ClassificationTask, TransitionClassifier)], featureNames: List[FeatureName], baseCostFunction: Option[StateCostFunction] = None) extends StateCostFunction with Product with Serializable

  3. trait ConstraintInterpretation extends (State, StateTransition) ⇒ Boolean

    A ConstraintInterpretation tells you whether a transition is inapplicable in a given state.

    A ConstraintInterpretation tells you whether a transition is inapplicable in a given state.

    Specifically, it is a function that takes a (state, transition) pair, and returns true if the transition is inapplicable.

  4. class DTCostFunctionTrainer extends StateCostFunctionTrainer

    The DTCostFunctionTrainer uses the our in-house decision tree implementation (org.allenai.nlpstack.parse.poly.decisiontree) to train a StateCostFunction.

    The DTCostFunctionTrainer uses the our in-house decision tree implementation (org.allenai.nlpstack.parse.poly.decisiontree) to train a StateCostFunction. Training is triggered during construction, after which the .costFunction field contains the trained StateCostFunction.

  5. case class EmbeddedClassifier(classifier: ProbabilisticClassifier, transitions: IndexedSeq[StateTransition], featureNameMap: Seq[(Int, FeatureName)], numFeatures: Int) extends TransitionClassifier with Product with Serializable

    An EmbeddedClassifier wraps a org.allenai.nlpstack.parse.poly.decisiontree.ProbabilisticClassifier implementation to provide a classifier interface that maps Transitions to probabilities.

    An EmbeddedClassifier wraps a org.allenai.nlpstack.parse.poly.decisiontree.ProbabilisticClassifier implementation to provide a classifier interface that maps Transitions to probabilities.

    classifier

    the underlying classifier

    transitions

    the possible outcomes of the underlying classifier

    featureNameMap

    a list of the feature indices followed by their names

    numFeatures

    the number of features in the underlying classifier

  6. case class FSMTrainingVector(task: ClassificationTask, transition: StateTransition, transitionSystem: TransitionSystem, state: State) extends Product with Serializable

    A TrainingVector is a triple of the form (task, featureVector, transition), where task is the ClassificationTask associated with the feature vector (featureVector), and transition is the correct classification of the feature vector.

    A TrainingVector is a triple of the form (task, featureVector, transition), where task is the ClassificationTask associated with the feature vector (featureVector), and transition is the correct classification of the feature vector.

    These labeled feature vectors are used to train classifiers.

  7. abstract class FSMTrainingVectorSource extends AnyRef

  8. case class FeatureUnion(features: Iterable[StateFeature]) extends StateFeature with Product with Serializable

    A FeatureUnion simply merges the output of a list of features.

    A FeatureUnion simply merges the output of a list of features.

    features

    a list of the features we want to merge into a single feature

  9. class GreedySearch extends Search

  10. case class InMemoryStateSource(states: Iterable[State]) extends StateSource with Product with Serializable

    A StateSource that keeps all its states in memory.

  11. trait MarbleBlock extends AnyRef

    A MarbleBlock is an unstructured input corresponding to a start state of a finite-state machine.

    A MarbleBlock is an unstructured input corresponding to a start state of a finite-state machine. The goal of the finite-state machine is to find a final state (which correponds to a Sculpture, i.e. a structured output).

    As an example, consider a transition-based parser. A MarbleBlock would be a sentence to be parsed, whereas a Sculpture would be a parse tree for that sentence.

  12. case class NbestCorpus(nbestLists: Iterable[NbestList]) extends Product with Serializable

    A sequence of NbestLists.

  13. case class NbestList(scoredSculptures: Iterable[(Sculpture, Double)]) extends Product with Serializable

    A sequence of (scored) sculptures.

  14. class NbestSearch extends AnyRef

    Finds the best n greedy paths through a finite-state machine.

  15. class NostalgicSearch extends AnyRef

    Like the GreedyTransitionParser, except that it remembers promising transitions that were not taken from the greedy (one-best) walk and returns those to the user.

  16. class Reranker extends AnyRef

    Chooses the lowest cost parse from an n-best list (according to the reranking function).

  17. abstract class RerankingFunction extends (Sculpture, Double) ⇒ Double

    A cost function for a pre-scored parse.

  18. case class ScoredWalk(walk: Walk, score: Double) extends Product with Serializable

    A ScoredWalk attaches a score to a Walk.

    A ScoredWalk attaches a score to a Walk.

    walk

    the unscored Walk

    score

    the floating-point score

  19. trait Sculpture extends AnyRef

    A Sculpture is a structured output corresponding to a final state of a finite-state machine, whose goal is to transform an unstructured input (a MarbleBlock) into a structured output.

    A Sculpture is a structured output corresponding to a final state of a finite-state machine, whose goal is to transform an unstructured input (a MarbleBlock) into a structured output.

    As an example, consider a transition-based parser. A MarbleBlock would be a sentence to be parsed, whereas a Sculpture would be a parse tree for that sentence.

  20. abstract class SculptureCost extends (Sculpture) ⇒ Double

  21. abstract class SculptureFeature extends (Sculpture) ⇒ FeatureVector

    A SculptureFeature computes a feature vector corresponding to a given sculpture.

  22. trait Search extends AnyRef

  23. case class SimpleTask(taskName: String) extends ClassificationTask with Product with Serializable

  24. case class SimpleTaskIdentifier(taskName: String) extends TaskIdentifier with Product with Serializable

    The SimpleTaskIdentifier identifies all states as the same SimpleTask.

    The SimpleTaskIdentifier identifies all states as the same SimpleTask.

    taskName

    the name of the task

  25. trait State extends AnyRef

    A state of a finite-state machine.

  26. trait StateCost extends (Option[State]) ⇒ Double

    A StateCost maps a state to a cost.

  27. abstract class StateCostFunction extends (State) ⇒ Map[StateTransition, Double]

    A StateCostFunction assigns a (real-valued) cost to the Transitions that can potentially be applied to a State.

    A StateCostFunction assigns a (real-valued) cost to the Transitions that can potentially be applied to a State. Generally speaking: the lower the cost, the better the transition.

    Typically, instances of StateCostFunction will compute this cost using a feature representation of the State. But this is not always the case -- see the GuidedCostFunction in org.allenai.nlpstack.parse.poly.polyparser.ArcEagerGuidedCostFunction for a cost function that uses a gold parse tree as the basis for its cost function.

  28. abstract class StateCostFunctionTrainer extends AnyRef

    A StateCostFunctionTrainer trains a StateCostFunction from data.

    A StateCostFunctionTrainer trains a StateCostFunction from data. Training is triggered during construction, after which the .costFunction field contains the trained TransitionCostFunctionAndClassifier.

  29. abstract class StateFeature extends (State) ⇒ FeatureVector

    A StateFeature computes a feature vector corresponding to a given parser state.

  30. trait StateSource extends AnyRef

  31. abstract class StateTransition extends (Option[State]) ⇒ Option[State]

  32. case class TaskConjunction(tasks: Seq[ClassificationTask]) extends ClassificationTask with Product with Serializable

    The TaskConjunction is a conjunction of ClassificationTasks.

    The TaskConjunction is a conjunction of ClassificationTasks.

    tasks

    the tasks we want to conjoin

  33. case class TaskConjunctionIdentifier(taskIdentifiers: List[TaskIdentifier], activeTaskConjuncts: Option[Set[ClassificationTask]]) extends TaskIdentifier with Product with Serializable

    The TaskConjunctionIdentifier allows you to create a TaskIdentifier by conjoining existing TaskIdentifiers.

    The TaskConjunctionIdentifier allows you to create a TaskIdentifier by conjoining existing TaskIdentifiers. You will want to do this if you want to partition feature vectors according to multiple criteria at once.

    taskIdentifiers

    the task identifiers you want to conjoin

  34. trait TaskIdentifier extends (State) ⇒ Option[ClassificationTask]

    A TaskIdentifier identifies the ClassificationTask required to determine the next transition from a given parser state.

  35. abstract class TransitionClassifier extends AnyRef

    A TransitionClassifier maps Transitions to probabilities.

  36. trait TransitionConstraint extends AnyRef

    A TransitionConstraint returns true if a given transition is illegal to apply in a given state.

  37. trait TransitionSystem extends AnyRef

  38. case class Walk(initialState: State, steps: Seq[WalkStep]) extends Product with Serializable

    A Walk is a walk through a finite-state machine.

    A Walk is a walk through a finite-state machine.

    initialState

    the state in which we begin

    steps

    the sequence of steps we take from the initial state

  39. case class WalkStep(state: State, transition: StateTransition) extends Product with Serializable

    A WalkStep is a single step in an FSM walk.

    A WalkStep is a single step in an FSM walk.

    state

    the current state

    transition

    the transition to take param transitionCosts the costs of the possible transitions in the current state

Value Members

  1. object BaseCostRerankingFunction extends RerankingFunction with Product with Serializable

  2. object ClassificationTask

  3. object FSMTrainingVectorSource

  4. object Fallback extends StateTransition with Product with Serializable

  5. object NbestCorpus extends Serializable

  6. object NbestList extends Serializable

  7. object NbestSearch

  8. object RerankingFunction

  9. object ScoredWalk extends Serializable

  10. object Sculpture

  11. object State

  12. object StateCostFunction

  13. object StateFeature

  14. object StateTransition

  15. object TaskConjunction extends Serializable

  16. object TaskConjunctionIdentifier extends Serializable

  17. object TaskIdentifier

  18. object TransitionClassifier

    Companion class for serializing TransitionClassifier instances.

  19. object TransitionConstraint

  20. object TransitionSystem

  21. object Walk extends Serializable

  22. object WalkStep extends Serializable

Ungrouped