Currently, the compiler doesn't support programs with numerical Maps that have negative output values for some inputs (cf PR #13).
For example, the program
out = rasp.numerical(rasp.Map(lambda x: x - 1, rasp.tokens))
raises an error when compiled with vocab={0,1,2} (or any vocab including values <= 0).
It would be nice to support this; for example, negative values could be shifted by a bias parameter.
Currently, the compiler doesn't support programs with numerical Maps that have negative output values for some inputs (cf PR #13).
For example, the program
raises an error when compiled with
vocab={0,1,2}(or any vocab including values <= 0).It would be nice to support this; for example, negative values could be shifted by a bias parameter.