string::Parse @Automaton fails with 0x20 (space) in the input alphabet
string::Parse @Automaton
fails when trying to feed it with a space in the input alphabet.
string::Compose
happily prints the space to the output...
> print NondeterministicApproximateSuffixAutomatonForHammingDistance "ah oj" 2 | string::Compose -
NFA a h j o
><(0, 0) (1, 1)|(2, 1)|(3, 0)|(4, 1)|(5, 1) (1, 0)|(2, 1)|(3, 1)|(4, 1)|(5, 1) (1, 1)|(2, 0)|(3, 1)|(4, 1)|(5, 1) (1, 1)|(2, 1)|(3, 1)|(4, 1)|(5, 0) (1, 1)|(2, 1)|(3, 1)|(4, 0)|(5, 1)
(...)
and it is not bothered by the fact that string::Parse
can't deal with it
> print NondeterministicApproximateSuffixAutomatonForHammingDistance "ah oj" 2 | string::Compose - | string::Parse @Automaton -
0 [Standard exception]: Evaluation of algorithm string::Parse failed.
1 [Common exception]: Invalid line format
I guess that this Bug | Feature
can be reproduced with other whitespace chars.
Found this while working on webui-client#48 (closed), webui parser suffers from the same issue