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: Seq[StateTransition], taskClassifierList: List[(ClassificationTask, TransitionClassifier)], marbleBlock: MarbleBlock, baseCostFunction: Option[StateCostFunction]) extends StateCostFunction with Product with Serializable

  3. case class ClassifierBasedCostFunctionFactory(transitionSystemFactory: TransitionSystemFactory, transitions: Seq[StateTransition], taskClassifierList: List[(ClassificationTask, TransitionClassifier)], baseCostFunctionFactory: Option[StateCostFunctionFactory] = None) extends StateCostFunctionFactory with Product with Serializable

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

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

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

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

  8. abstract class FSMTrainingVectorSource extends AnyRef

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

  10. class GreedySearch extends Search

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

    A StateSource that keeps all its states in memory.

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

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

    A sequence of NbestLists.

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

    A sequence of (scored) sculptures.

  15. class NbestSearch extends AnyRef

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

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

  17. class Reranker extends AnyRef

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

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

    A cost function for a pre-scored parse.

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

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

  21. abstract class SculptureCost extends (Sculpture) ⇒ Double

  22. abstract class SculptureFeature extends (Sculpture) ⇒ FeatureVector

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

  23. trait Search extends AnyRef

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

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

  26. trait State extends AnyRef

    A state of a finite-state machine.

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

    A StateCost maps a state to a cost.

  28. abstract class StateCostFunction extends (State) ⇒ Map[StateTransition, Float]

    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.

  29. trait StateCostFunctionFactory extends AnyRef

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

  31. abstract class StateFeature extends (State) ⇒ FeatureVector

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

  32. trait StateSource extends AnyRef

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

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

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

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

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

  37. abstract class TransitionClassifier extends AnyRef

    A TransitionClassifier maps Transitions to probabilities.

  38. trait TransitionConstraint extends AnyRef

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

  39. trait TransitionSystem extends AnyRef

  40. trait TransitionSystemFactory extends AnyRef

    A TransitionSystemFactory is a factory that constructs marbleblock-specific transition systems.

    A TransitionSystemFactory is a factory that constructs marbleblock-specific transition systems. For instance, in parsing, this would create a transition system for each input sentence that you want to parse.

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

  42. 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 StateCostFunctionFactory

  13. object StateFeature

  14. object StateTransition

  15. object TaskConjunctionIdentifier extends Serializable

  16. object TaskIdentifier

  17. object TransitionClassifier

    Companion class for serializing TransitionClassifier instances.

  18. object TransitionConstraint

  19. object TransitionSystem

  20. object TransitionSystemFactory

  21. object Walk extends Serializable

  22. object WalkStep extends Serializable

Ungrouped