bakwc / JamSpell

Modern spell checking library - accurate, fast, multi-language
https://jamspell.com/
MIT License
612 stars 103 forks source link

Segmentation fault #91

Closed altopcoder closed 4 years ago

altopcoder commented 4 years ago

Hi! i've got error - Segmentation fault , when I run this code on Ubuntu 18.04.3:

import jamspell

corrector = jamspell.TSpellCorrector()
corrector.LoadLangModel('en.bin')

corrector.FixFragment('I am the begt spell cherken!')
# u'I am the best spell checker!'

corrector.GetCandidates(['i', 'am', 'the', 'begt', 'spell', 'cherken'], 3)
# (u'best', u'beat', u'belt', u'bet', u'bent', ... )

corrector.GetCandidates(['i', 'am', 'the', 'begt', 'spell', 'cherken'], 5)
# (u'checker', u'chicken', u'checked', u'wherein', u'coherent', ...)

Can anybody help?Thanks!

damosuzuki commented 4 years ago

This is probably because the model en.bin cannot be located. See https://github.com/bakwc/JamSpell/issues/61

bakwc commented 4 years ago

Fixed in Pro version, pro version writes errors in log instead of failing.

JamSpellPro is available at jamspell.com

ducanh841988 commented 12 months ago

@bakwc I face this problem with Pro version. I checked that the model path is correct. [info] loading lang model. Segmentation fault (core dumped)