Open wincentbalin opened 1 year ago
Current test web page is here: https://wincentbalin.github.io/BabyFST
@mhulden, is it possible to debug a (rather large) FST state-by-state using for example flookup
? I would like to compare resuting paths with flookup
vs. with foma_apply_down.js
.
The error was on my side: flookup
applies up, whereas foma_apply_down.js
applies down (even the names tell that!). I inverted the FST and then it returned results almost as expected.
The output of foma_apply_down.js
still differs from the output of flookup
as described in the README of BabyFST: https://github.com/asahala/BabyFST. For example, the input iddin
returns only nadānu+V+Gt+Imp=2Sg=Masc
with foma_apply_down.js
, but
nadānu+V+Gt+Imp=2Sg=Masc
nadānu+V+G+Prt=3Sg=Masc
nadānu+V+G+Prt=3Sg=Fem
with flookup
.
Because of different outputs I will not close this issue.
Note that there is a bug in foma2js.py
which causes it to omit symbols in the alphabet, which may be the cause of your problem. Can you test with the fixed version from #156 ?
Dear @dhdaines, I have seen your solution already, and I will test it in a couple of days.
Dear @dhdaines, at last I did execute the foma2js.py
from #156, but sadly the problem with idinu
still persists.
When testing the FST in the file
babyfst-2020.foma
from the repository https://github.com/asahala/BabyFST the suggested test casesreturn when running
flookup babyfst-2020.foma < input.txt
Instead, after converting the file
babyfst-2020.foma
to Javascript using commandpython3 ./foma2js.py -n BabyFST babyfst-2020.fomabin > babyfst.js
and creating a web page withbabyfst.js
andfoma_apply_down.js
, runningfoma_apply_down(BabyFST, 'iddin')
results in an empty array.A file converted using the original Perl script
foma2js.perl
yielded the same result.