danbikel.parser.ms
Class ModNonterminalModelStructure5
java.lang.Object
danbikel.parser.ProbabilityStructure
danbikel.parser.ms.ModNonterminalModelStructure4
danbikel.parser.ms.ModNonterminalModelStructure5
- All Implemented Interfaces:
- Serializable
public class ModNonterminalModelStructure5
- extends ModNonterminalModelStructure4
This class provides a probability structure identical to its superclass,
except that getFuture(TrainerEvent,int)
has been overridden so
that the future only consists of an unlexicalized modifying nonterminal
label. Furthermore, this probability structure overrides the
jointModel()
method to return an array containing a
TagModelStructure1
instance.
- See Also:
jointModel()
,
TagModelStructure1
,
Serialized Form
Fields inherited from class danbikel.parser.ProbabilityStructure |
additionalData, defaultModelClassName, defaultModelConstructor, doPruning, estimates, futureList, futures, futuresWithSubcats, histories, historiesWithSubcats, historyList, lambdas, prevHistCount, topLevelCacheSize, transitions |
Method Summary |
ProbabilityStructure |
copy()
Returns a deep copy of this object. |
Event |
getFuture(TrainerEvent trainerEvent,
int backOffLevel)
Extracts the future for the specified level of back-off from the specified
trainer event. |
ProbabilityStructure[] |
jointModel()
Returns an array of other ProbabilityStructure objects
for use in a JointModel instance, or null
if this probability structure should not be composed with a
JointModel instance. |
Model |
newModel()
Returns a newly-constructed Model object for this
probability structure. |
Methods inherited from class danbikel.parser.ProbabilityStructure |
cacheSize, defaultSmoothingParamsFilename, dontAddNewParameters, doPruning, getAdditionalData, getTopLevelCacheSize, getTransition, lambdaFudge, lambdaFudgeTerm, lambdaPenalty, 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 |
ModNonterminalModelStructure5
public ModNonterminalModelStructure5()
getFuture
public Event getFuture(TrainerEvent trainerEvent,
int backOffLevel)
- Description copied from class:
ProbabilityStructure
- Extracts the future for the specified level of back-off from the specified
trainer event. Typically, futures remain the same regardless of back-off
level.
- Overrides:
getFuture
in class ModNonterminalModelStructure4
- Parameters:
trainerEvent
- the event from which a future is to be extractedbackOffLevel
- the back-off level for which to get the future event
- Returns:
- an
Event
object that represents the future
for the specified back-off level
newModel
public Model newModel()
- Description copied from class:
ProbabilityStructure
- Returns a newly-constructed
Model
object for this
probability structure. The default implementation here returns
an instance of Model
. If a concrete
ProbabilityStructure
class overrides
ProbabilityStructure.jointModel()
, it should use this method to return an
instance of a class that is suitable for handling multiple
ProbabilityStructure
objects, such as JointModel
.
- Overrides:
newModel
in class ProbabilityStructure
- See Also:
ProbabilityStructure.jointModel()
,
Model
,
JointModel
jointModel
public ProbabilityStructure[] jointModel()
- Description copied from class:
ProbabilityStructure
- Returns an array of other
ProbabilityStructure
objects
for use in a JointModel
instance, or null
if this probability structure should not be composed with a
JointModel
instance. This default implementation returns
null
.
- Overrides:
jointModel
in class ProbabilityStructure
- Returns:
- an array of other
ProbabilityStructure
objects, or null
if this probability structure should
not be composed with a JointModel
instance - See Also:
JointModel
copy
public ProbabilityStructure copy()
- Description copied from class:
ProbabilityStructure
- Returns a deep copy of this object. Currently, all data members
of
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.
- Overrides:
copy
in class ModNonterminalModelStructure4
Author: Dan Bikel.