Parsing Engine

danbikel.parser.ms
Class BrokenLexPriorModelStructure

java.lang.Object
  extended by danbikel.parser.ProbabilityStructure
      extended by danbikel.parser.ms.BrokenLexPriorModelStructure
All Implemented Interfaces:
Serializable

public class BrokenLexPriorModelStructure
extends ProbabilityStructure

Provides the complete back-off structure for the submodel that generates the marginal probabilities of lexical items and their parts of speech (loosely but inaccurately called “lexical priors”). This model is “broken” in that it is just like LexPriorModelStructure1 but does not override the ProbabilityStructure.lambdaFudge(int) and ProbabilityStructure.lambdaFudgeTerm(int) methods as would be required to replicate the model Collins implemented for his thesis.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class danbikel.parser.ProbabilityStructure
additionalData, defaultModelClassName, defaultModelConstructor, doPruning, estimates, futureList, futures, futuresWithSubcats, histories, historiesWithSubcats, historyList, lambdas, prevHistCount, topLevelCacheSize, transitions
 
Constructor Summary
BrokenLexPriorModelStructure()
          Constructs a new instance.
 
Method Summary
 ProbabilityStructure copy()
          Returns a copy of this instance.
 Event getFuture(TrainerEvent trainerEvent, int backOffLevel)
          Returns an event whose two components are the word and part-of-speech for which a marginal probability is being computed.
 Event getHistory(TrainerEvent trainerEvent, int backOffLevel)
          As this model simulates unconditional probabilities using relative-frequency estimation, this method returns a history whose sole component is a dummy object that is the same regardless of the “future” being estimated.
 int maxEventComponents()
          Returns 2.
 int numLevels()
          As this model simulates unconditional probabilities using relative-frequency estimation, it has only one back-off level that returns a dummy object.
 
Methods inherited from class danbikel.parser.ProbabilityStructure
cacheSize, defaultSmoothingParamsFilename, doCleanup, dontAddNewParameters, doPruning, getAdditionalData, getTopLevelCacheSize, getTransition, jointModel, lambdaFudge, lambdaFudgeTerm, lambdaPenalty, newModel, priorLevel, removeFuture, removeHistory, removeTransition, saveSmoothingParameters, setAdditionalData, smoothingParametersFile, useSmoothingParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokenLexPriorModelStructure

public BrokenLexPriorModelStructure()
Constructs a new instance.

Method Detail

maxEventComponents

public int maxEventComponents()
Returns 2.

Overrides:
maxEventComponents in class ProbabilityStructure
Returns:
1 (subclasses should override this method)
See Also:
MutableEvent.ensureCapacity(int)

numLevels

public int numLevels()
As this model simulates unconditional probabilities using relative-frequency estimation, it has only one back-off level that returns a dummy object.

Specified by:
numLevels in class ProbabilityStructure
Returns:
the integer 1

getHistory

public Event getHistory(TrainerEvent trainerEvent,
                        int backOffLevel)
As this model simulates unconditional probabilities using relative-frequency estimation, this method returns a history whose sole component is a dummy object that is the same regardless of the “future” being estimated.

Specified by:
getHistory in class ProbabilityStructure
Parameters:
trainerEvent - the maximal context event that is ignored by this method
backOffLevel - the back-off level that is ignored by this method
Returns:
a history whose sole component is a dummy object
See Also:
PriorEvent.history()

getFuture

public Event getFuture(TrainerEvent trainerEvent,
                       int backOffLevel)
Returns an event whose two components are the word and part-of-speech for which a marginal probability is being computed.

Specified by:
getFuture in class ProbabilityStructure
Parameters:
trainerEvent - the maximal-context event from which to construct the event containing the word/part-of-speech pair whose marginal is being estimated
backOffLevel - back-off level (ignored)
Returns:
an event whose two components are the word and part-of-speech for which a marginal probability is being computed

copy

public ProbabilityStructure copy()
Returns a copy of this instance.

Specified by:
copy in class ProbabilityStructure

Parsing Engine

Author: Dan Bikel.