|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.parser.PriorEvent
public class PriorEvent
A class to represent the marginal probabilities of lexicalized nonterminals (loosely, if incorrectly, referred to as “prior probabilities”).
Constructor Summary | |
---|---|
PriorEvent(Word headWord,
Symbol label)
Constructs a new PriorEvent object, setting all its
data members to the specified values. |
Method Summary | |
---|---|
Object |
clone()
Returns a deep copy of this object. |
TrainerEvent |
copy()
Returns a deep copy of this object. |
boolean |
equals(Object obj)
Returns whether the specified object is also an instance of this class and is equal to this object. |
int |
hashCode()
Returns a hash code for this object. |
Word |
headWord()
Returns the head word of this event. |
Symbol |
history()
Returns the same symbol for all instances of this class, so that priors may be computed via the same mechanism as conditional probabilities: if the conditioning context is the same for all events counted, then the MLEs for those conditional events are the same as would be the MLEs for the prior probabilities of the predicted events. |
Symbol |
label()
Returns the nonterminal label of this event. |
Word |
modHeadWord()
Returns null . |
Symbol |
parent()
Returns null . |
void |
set(Word headWord,
Symbol label)
Sets the head word and nonterminal label (all the data members) of this event. |
void |
setHeadWord(Word headWord)
Sets the head word of this event. |
TrainerEvent |
shallowCopy()
Returns a shallow copy of this object. |
boolean |
side()
Throws an UnsupportedOperationException , as this is not
a modifier event. |
String |
toString()
Returns an S-expression string representation of the data in this object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PriorEvent(Word headWord, Symbol label)
PriorEvent
object, setting all its
data members to the specified values.
headWord
- the head wordlabel
- the unlexicalized nonterminal labelMethod Detail |
---|
public Word headWord()
headWord
in interface TrainerEvent
public Symbol label()
public Symbol history()
public Symbol parent()
null
.
parent
in interface TrainerEvent
public Word modHeadWord()
null
.
modHeadWord
in interface TrainerEvent
public void set(Word headWord, Symbol label)
headWord
- the head wordlabel
- the nontemrinal labelpublic void setHeadWord(Word headWord)
setHeadWord
in interface TrainerEvent
headWord
- the head wordpublic boolean side()
UnsupportedOperationException
, as this is not
a modifier event.
side
in interface TrainerEvent
UnsupportedOperationException
- because this is not a modifier
eventpublic boolean equals(Object obj)
equals
in class Object
obj
- the object to compare with this object
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public Object clone()
clone
in class Object
public TrainerEvent copy()
copy
in interface TrainerEvent
public TrainerEvent shallowCopy()
shallowCopy
in interface TrainerEvent
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |