|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanbikel.parser.BaseNPAwareShifter
public class BaseNPAwareShifter
An implementation of the Shift interface that does not shift punctuation into the history when the current parent node label is that of a base NP.
Treebank.isBaseNP(Symbol),
Treebank.isPunctuation(Symbol)| Constructor Summary | |
|---|---|
BaseNPAwareShifter()
Constructs an instance of this base NP–aware shifter. |
|
| Method Summary | |
|---|---|
void |
shift(TrainerEvent event,
SexpList list,
Sexp prevMod)
The previous modifier is not shifted into the history if the current parent (as determined by TrainerEvent.parent()) is a base
NP and the previous modifier is punctuation. |
void |
shift(TrainerEvent event,
WordList wordList,
Word prevWord)
The head word of the previous modifier is not shifted into the history if the current parent (as determined by TrainerEvent.parent()) is a base NP and the previous modifier is
punctuation. |
boolean |
skip(Item item,
Sexp prevMod)
The previous modifier is skipped (not included in the construction of the history) if the current parent (as determined by CKYItem.label())
is a base NP and the previous modifier is punctuation. |
boolean |
skip(Item item,
Word prevWord)
The head word of the previous modifier is skipped (not included in the construction of the history) ifthe current parent (as determined by CKYItem.label()) is a base NP and the previous modifier is punctuation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseNPAwareShifter()
| Method Detail |
|---|
public void shift(TrainerEvent event,
SexpList list,
Sexp prevMod)
TrainerEvent.parent()) is a base
NP and the previous modifier is punctuation.
shift in interface Shiftevent - the TrainerEvent whose history is to be updatedlist - the current history of previously-generated modifiersprevMod - the previously-generated modifierTreebank.isBaseNP(Symbol),
Treebank.isPunctuation(Symbol)
public void shift(TrainerEvent event,
WordList wordList,
Word prevWord)
TrainerEvent.parent()) is a base NP and the previous modifier is
punctuation.
shift in interface Shiftevent - the TrainerEvent whose history is to be updatedwordList - the current history of previously-generated modifier
head wordsprevWord - the head word of the previously-generated modifierTreebank.isBaseNP(Symbol),
Treebank.isPunctuation(Symbol)
public boolean skip(Item item,
Sexp prevMod)
CKYItem.label())
is a base NP and the previous modifier is punctuation.
skip in interface Shiftitem - the CKYItem object whose history is being constructedprevMod - the previously-generated modifier
Treebank.isBaseNP(Symbol),
Treebank.isPunctuation(Symbol)
public boolean skip(Item item,
Word prevWord)
CKYItem.label()) is a base NP and the previous modifier is punctuation.
skip in interface Shiftitem - the CKYItem object whose history is being constructedprevWord - the head word of the previously-generated modifier
Treebank.isBaseNP(Symbol),
Treebank.isPunctuation(Symbol)
|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||