|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.parser.ProbabilityStructure
danbikel.parser.ms.ModNonterminalModelStructure8
public class ModNonterminalModelStructure8
Representation of the complete back-off structure of the generation model for modifying nonterminals/part-of-speech tags (the modifying nonterminals are partially lexicalized with the parts of speech of their respective head words).
This probability structure is identical to that of ModNonterminalModelStructure2
, except that argument augmentations are never
removed from parent nonterminal labels.
It is a horrendous bug that all of these ProbabilityStructure
classes do not copy various lists from the TrainerEvent
objects
before removing gap augmentations from their elements.
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 | |
---|---|
ModNonterminalModelStructure8()
|
Method Summary | |
---|---|
ProbabilityStructure |
copy()
Returns a deep copy of this object. |
boolean |
doCleanup()
Indicates whether the Model class needs to invoke
its cleanup method at the end of its deriveCounts method. |
Event |
getFuture(TrainerEvent trainerEvent,
int backOffLevel)
Extracts the future for the specified level of back-off from the specified trainer event. |
Event |
getHistory(TrainerEvent trainerEvent,
int backOffLevel)
Extracts the history context for the specified back-off level from the specified trainer event. |
int |
maxEventComponents()
Allows subclasses to specify the maximum number of event components, so that the constructor of this class may pre-allocate space in its internal, reusable MutableEvent objects (used for efficient
event construction). |
int |
numLevels()
Returns the number of back-off levels. |
boolean |
removeHistory(int backOffLevel,
Event history)
In order to gather statistics for words that appear as the head of the entire sentence when estimating p(w | t), the trainer "fakes" a modifier event, as though the root node of the observed tree was seen to modify the magical +TOP+ node. |
Methods inherited from class danbikel.parser.ProbabilityStructure |
---|
cacheSize, defaultSmoothingParamsFilename, dontAddNewParameters, doPruning, getAdditionalData, getTopLevelCacheSize, getTransition, jointModel, lambdaFudge, lambdaFudgeTerm, lambdaPenalty, newModel, priorLevel, removeFuture, 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 |
---|
public ModNonterminalModelStructure8()
Method Detail |
---|
public int maxEventComponents()
ProbabilityStructure
MutableEvent
objects (used for efficient
event construction). The default implementation simply returns 1.
maxEventComponents
in class ProbabilityStructure
MutableEvent.ensureCapacity(int)
public int numLevels()
ProbabilityStructure
numLevels
in class ProbabilityStructure
public Event getHistory(TrainerEvent trainerEvent, int backOffLevel)
ProbabilityStructure
getHistory
in class ProbabilityStructure
trainerEvent
- the event for which a history context is desired
for the specified back-off levelbackOffLevel
- the back-off level for which to get a history context
from the specified trainer event
Event
object that represents the history context
for the specified back-off levelpublic Event getFuture(TrainerEvent trainerEvent, int backOffLevel)
ProbabilityStructure
getFuture
in class ProbabilityStructure
trainerEvent
- the event from which a future is to be extractedbackOffLevel
- the back-off level for which to get the future event
Event
object that represents the future
for the specified back-off levelpublic boolean doCleanup()
ProbabilityStructure
Model
class needs to invoke
its cleanup method at the end of its deriveCounts
method. The default implementation here returns
false
.
doCleanup
in class ProbabilityStructure
ProbabilityStructure.removeHistory(int,Event)
,
ProbabilityStructure.removeFuture(int,Event)
,
ProbabilityStructure.removeTransition(int,Transition)
,
Model.deriveCounts(CountsTable,danbikel.util.Filter,double,danbikel.util.FlexibleMap)
,
Model.cleanup()
public boolean removeHistory(int backOffLevel, Event history)
removeHistory
in class ProbabilityStructure
Model.deriveCounts(CountsTable,danbikel.util.Filter,double,danbikel.util.FlexibleMap)
,
Model.cleanup()
public ProbabilityStructure copy()
ProbabilityStructure
ProbabilityStructure
objects are used solely as
temporary storage during certain method invocations; therefore,
this copy method should simply return a new instance of the runtime
type of this ProbabilityStructure
object, with
freshly-created data members that are not deep copies of
the data members of this object. The general contract of the
copy method is slightly violated here, but without undue harm,
given the lack of persistent data of these types of objects. If a
concrete subclass has specific requirements for its data members
to be deeply copied, this method should be overridden.
copy
in class ProbabilityStructure
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |