|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.parser.HeadEvent
public class HeadEvent
A class to represent the head generation event implicit in the models
supported by this parsing package. The class Trainer
counts
such events, from which other events are derived.
Constructor Summary | |
---|---|
HeadEvent(Sexp sexp)
Contructs a new object from the specified S-expression. |
|
HeadEvent(Word headWord,
Symbol parent,
Symbol head,
SexpList leftSubcat,
SexpList rightSubcat)
Constructs a new HeadEvent object, setting all its data
members to the specified values. |
|
HeadEvent(Word headWord,
Symbol parent,
Symbol head,
Subcat leftSubcat,
Subcat rightSubcat)
Constructs a new HeadEvent object, settings 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 o)
Returns true if the specified object is an instance of
a HeadEvent object containing data members which are all
pairwise-equal with the data members of this HeadEvent
object, according to each data member's equals(Object) method. |
int |
hashCode()
Returns the hash code of this object, calculated from the hash codes of all its data members. |
Symbol |
head()
Returns the head nonterminal label of this head event. |
Word |
headWord()
Returns the head word of this head event. |
Subcat |
leftSubcat()
Returns the left subcategorization frame of this head event. |
Word |
modHeadWord()
Returns null , as head events do not deal with modifier words. |
Symbol |
parent()
Returns the parent nonterminal label of this head event. |
Subcat |
rightSubcat()
Returns the right subcategorization frame of this head event. |
void |
setHeadWord(Word headWord)
Sets the head word of this event, or does nothing if this TrainerEvent has no such object. |
TrainerEvent |
shallowCopy()
Returns a shallow copy of this event of the same run-time type. |
boolean |
side()
Throws an UnsupportedOperationException , as this is not
a modifier event. |
String |
toString()
Returns an S-expression of the form accepted by HeadEvent(Sexp) . |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HeadEvent(Sexp sexp)
Sexp
must be an instance of a list with the
following format:
(headWord parent head leftSubcat rightSubcat)where
Sexp word constructor
sexp
- a list containing all the information necessary to
construct this HeadEvent
objectpublic HeadEvent(Word headWord, Symbol parent, Symbol head, SexpList leftSubcat, SexpList rightSubcat)
HeadEvent
object, setting all its data
members to the specified values.
headWord
- the head wordparent
- the parent nonterminal labelhead
- the head nonterminal labelleftSubcat
- an S-expression representation of the left
subcategorization frame, to be converted to a Subcat
instance via Subcats.get(SexpList)
rightSubcat
- an S-expression representation of the right
subcategorization frame, to be converted to a Subcat
instance via Subcats.get(SexpList)
public HeadEvent(Word headWord, Symbol parent, Symbol head, Subcat leftSubcat, Subcat rightSubcat)
HeadEvent
object, settings all its data
members to the specified values.
headWord
- the head wordparent
- the parent nonterminal labelhead
- the head nonterminal labelleftSubcat
- the left subcategorization framerightSubcat
- the right subcategorization frameMethod Detail |
---|
public Word headWord()
headWord
in interface TrainerEvent
public Symbol parent()
parent
in interface TrainerEvent
public Symbol head()
public Subcat leftSubcat()
public Subcat rightSubcat()
public Word modHeadWord()
null
, as head events do not deal with modifier words.
modHeadWord
in interface TrainerEvent
public void setHeadWord(Word headWord)
TrainerEvent
TrainerEvent
has no such object.
setHeadWord
in interface TrainerEvent
headWord
- the word to set as the head word of this eventpublic 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 o)
true
if the specified object is an instance of
a HeadEvent
object containing data members which are all
pairwise-equal with the data members of this HeadEvent
object, according to each data member's equals(Object)
method.
equals
in class Object
public String toString()
HeadEvent(Sexp)
.
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()
TrainerEvent
shallowCopy
in interface TrainerEvent
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |