An OfflineTokenFeature creates a StateFeature from an AnnotatedSentence and a StateRef.
Essentially it simply takes the pre-annotated features from the token referenced by
the StateRef (see definitions of AnnotatedSentence and StateRef for details).
For instance, suppose we want the pre-annotated feature corresponding to
the word at the top of the stack. We can achieve this with
OfflineTokenFeature(annotatedSentence, StackRef(0)).
annotatedSentence
a sentence whose tokens are annotated with features
An OfflineTokenFeature creates a StateFeature from an AnnotatedSentence and a StateRef.
Essentially it simply takes the pre-annotated features from the token referenced by the StateRef (see definitions of AnnotatedSentence and StateRef for details).
For instance, suppose we want the pre-annotated feature corresponding to the word at the top of the stack. We can achieve this with OfflineTokenFeature(annotatedSentence, StackRef(0)).
a sentence whose tokens are annotated with features
the StateRef that refers to our desired token(s)