Skip to content

TypeError in pythainlp.spell.symspellpy #650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wannaphong opened this issue Feb 9, 2022 · 1 comment
Closed

TypeError in pythainlp.spell.symspellpy #650

wannaphong opened this issue Feb 9, 2022 · 1 comment
Labels
bug bugs in the library

Comments

@wannaphong
Copy link
Member

Description

pythainlp.spell.symspellpy has error with symspellpy v6.7.6.

======================================================================
ERROR: test_correct_sent (test_spell.TestSpellPackage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/test-pythainlp-pip/test-pythainlp-pip/pythainlp_test/pythainlp-3.0.2/tests/test_spell.py", line 133, in test_correct_sent
    correct_sent(self.spell_sent, engine="symspellpy")
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pythainlp/spell/core.py", line 176, in correct_sent
    return spell_sent(list_words, engine=engine)[0]
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pythainlp/spell/core.py", line 141, in spell_sent
    list_new = symspellpy_spell(list_words)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pythainlp/spell/symspellpy.py", line 57, in spell_sent
    max_edit_distance=max_edit_distance
TypeError: lookup_compound() got an unexpected keyword argument 'split_phrase_by_space'

======================================================================
ERROR: test_spell_sent (test_spell.TestSpellPackage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/test-pythainlp-pip/test-pythainlp-pip/pythainlp_test/pythainlp-3.0.2/tests/test_spell.py", line 125, in test_spell_sent
    self.assertIsNotNone(spell_sent(self.spell_sent, engine="symspellpy"))
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pythainlp/spell/core.py", line 141, in spell_sent
    list_new = symspellpy_spell(list_words)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pythainlp/spell/symspellpy.py", line 57, in spell_sent
    max_edit_distance=max_edit_distance
TypeError: lookup_compound() got an unexpected keyword argument 'split_phrase_by_space'

----------------------------------------------------------------------
@wannaphong wannaphong added the bug bugs in the library label Feb 9, 2022
wannaphong added a commit that referenced this issue Feb 9, 2022
- Fixed  TypeError in pythainlp.spell.symspellpy #650
@wannaphong
Copy link
Member Author

Fixed b403435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs in the library
Projects
None yet
Development

No branches or pull requests

1 participant