I am trying to implement a new FeatureGenerator (implementing directly the interface) which plugs into my current code.
I am not interested in inheriting from FeatureGenImpl because it doesn't look like it could plug easily to my code.
I understand that I should implement the startScanFeaturesAt which accepts a data sequence and a position (pos) and the hasNext/next methods
(all from the FeatureGenerator interface).

What features I should enumerate for that position pos? Should it be all features of the form f(y_{pos-1},y_pos,obs)?
And also, how does the feature generator distinguish between the different states? Shouldn't startScanFeaturesAt
be specific to a pair of states (the prev state and the current state and the position)?
I can't see how the decoder knows to associate a feature that fired with a state.