|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Shift
Methods used for the construction of prior states in the Markov
process of creating modifier nonterminals. Currently, prior state
is stored in a previous modifier list (a SexpList
object) and a previous modifier head-word list (a
WordList object), so the methods here are used to
"shift" a new modifier to the head of these lists, losing the last
element of the list (which was the least-recently-generated
previous modifier). In the decoder, these previous modifier lists
are constructed, so there are two "skip" methods that
indicate whether to skip over certain previously-generated
modifiers in the construction of these lists.
Implementation note: In the future, the Markov process of
generating modifiers will be implemented in a cleaner fashion, by
introducing a special State object, which implementors
of this interface will manipulate. In other words, this interface
will serve to specify a transition function, allowing
greater flexibility in the experimentation with different notions
of history in the Markov process.
| Method Summary | |
|---|---|
void |
shift(TrainerEvent event,
SexpList list,
Sexp prevMod)
Shifts the previously-generated modifier label into the history. |
void |
shift(TrainerEvent event,
WordList wordList,
Word prevWord)
Shifts the previously-generated modifier head word into the history. |
boolean |
skip(Item item,
Sexp prevMod)
Returns whether the previously-generated modifier should be skipped when constructing a history for the specified chart item. |
boolean |
skip(Item item,
Word prevWord)
Returns whether the previously-generated modifier head word should be skipped when constructing a history for the specified chart item. |
| Method Detail |
|---|
void shift(TrainerEvent event,
SexpList list,
Sexp prevMod)
event - the TrainerEvent whose history is to be updatedlist - the current history of previously-generated modifiersprevMod - the previously-generated modifier
void shift(TrainerEvent event,
WordList wordList,
Word prevWord)
event - the TrainerEvent whose history is to be updatedwordList - the current history of previously-generated modifier
head wordsprevWord - the head word of the previously-generated modifier
boolean skip(Item item,
Sexp prevMod)
item - the CKYItem object whose history is being constructedprevMod - the previously-generated modifier
boolean skip(Item item,
Word prevWord)
item - the CKYItem object whose history is being constructedprevWord - the head word of the previously-generated modifier
|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||