mideind / GreynirCorrect

Spelling and grammar correction for Icelandic
Other
16 stars 3 forks source link

Outdated README? #64

Open atlijas opened 1 month ago

atlijas commented 1 month ago

The examples in the README do not work.

>>> from reynir_correct import tokenize

gives this error

ImportError: cannot import name 'tokenize' from 'reynir_correct' (path/to/python/site-packages/reynir_correct/__init__.py). Did you mean: 'detokenize'?

and

>>> from reynir_correct import check_single

gives this error

ImportError: cannot import name 'check_single' from 'reynir_correct' (path/to/python/site-packages/reynir_correct/__init__.py)

and

from reynir_correct import check_errors
x = "Páli, vini mínum, langaði að horfa á sjónnvarpið."
options = { "input": x, "annotations": True, "format": "text" }
s = check_errors(**options)

gives this error

reynir.basics.ConfigError: File config/GreynirCorrect.conf, line 3903: No BÍN meaning for 'Bandaríkin' (from error word 'bandaríkin') in capitalization_errors section
sveinbjornt commented 3 weeks ago

Thank you for the feedback, Atli! According to the release notes for version 4.0.0 of this package, one of the changes was "Redesigned the API to be more user friendly" but it seems that the README file was not updated to reflect these changes, which is of course not very user friendly!

Meanwhile, you should be able to install version Version 3.4.7 and the README documentation will apply.

As for the BÍN error, I am still looking into it. It looks like the latest version of BÍN from Árnastofnun changed the database in a way that broke some of our patches. Regressing to islenska (BinPackage) version 1.0.0 seems to fix it, but exactly why remains unclear at this point. We aim to release a new version of GreynirCorrect soon which addresses these issues!