hfst / hfst-ospell

HFST spell checker library and command line tool
Apache License 2.0
13 stars 9 forks source link

hfst-ospell crashes with weighted acceptor #9

Closed hfst-importer closed 8 years ago

hfst-importer commented 10 years ago

To reproduce:

check out and build svn@HEAD of $GTHOME/langs/sme (at rev 83634 as of this writing), then:

cd tools/spellcheckers/fstbased/hfst
echo "ođasmáhttan" | hfst-ospell se.zhfst 
libc++abi.dylib: terminating with uncaught exception of type std::length_error: vector
Abort trap: 6

$ hfst-ospell -V

hfstospell 0.2.5_beta
Nov 15 2013 13:32:41
copyright (C) 2009 - 2011 University of Helsinki

OS version:

$ uname -a
Darwin dsl-hkibrasgw2-58c361-111.dhcp.inet.fi 13.0.0 Darwin Kernel Version 13.0.0:
Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

AKA: MacOSX 10.9 / Maverick

Expected behavior:

  1. should not crash
  2. instead it should give a list of suggestions for the incorrect string given in the output
  3. if the transducer is unacceptable for any reason, give an error message, and quit gracefully

Reported by: snomos

hfst-importer commented 10 years ago

Until very recently, we didn't use weighted acceptors, only unweighted ones, and hfst-ospell worked without major issues. Now we want to use weighted ones, to use weights on the acceptor to tune the suggestions. The weights are added using hfst-reweight, and is called in the make file:

tools/spellcheckers/fstbased/hfst/Makefile.am

Original comment by: snomos

hfst-importer commented 10 years ago

After the first crash (with uncaught exception/Abort trap: 6), hfst-ospell now consistently gives a segmentation fault instead:

hfst-ospell se.zhfst 
Segmentation fault: 11

Original comment by: snomos