Skip to content
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

Help adding n-gram data #81

Open
enzoferrari1 opened this issue Oct 20, 2023 · 0 comments
Open

Help adding n-gram data #81

enzoferrari1 opened this issue Oct 20, 2023 · 0 comments

Comments

@enzoferrari1
Copy link

Hi! I wanted to add the n-gram data to make the tool able to detect more errors but i don't know how to do it. I read the documentation and i tried adding in the config dict the languageModel param but i couldn't notice any changes in the responses.
!pip install language_tool_python !wget https://languagetool.org/download/ngram-data/ngrams-en-20150817.zip !unzip ngrams-en-20150817.zip -d ngrams import language_tool_python tool = language_tool_python.LanguageTool('en-US', config={ 'languageModel' : '/content/ngrams/en/'}) text = 'There sandwich was eaten' matches = tool.check(text) matches

matches returns [] (emtpy list), when should detect There -> Their.

Could you give me an example on how to load the data?

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

No branches or pull requests

1 participant