an upper bound on the number of children (anything higher will round down to max
)
Provides a symbolic representation of the transform, used for creating feature names.
Provides a symbolic representation of the transform, used for creating feature names.
The NumChildrenToTheLeft transform maps a token to how many of its children appear to its left in the state's
tokens
sequence.It takes an argument
max
which allows you to specify an upper bound. For instance, ifmax
= 3 and a token has 5 children, then applying this transform to that token will return Set(Symbol("3")), not Set(Symbol("5")).See the definition of TokenTransform (above) for more details about the interface.
an upper bound on the number of children (anything higher will round down to
max
)