wysiib / linter-languagetool

Integration of Languagetool into the Atom text editor.
MIT License
18 stars 5 forks source link

How to enable n-gram? #36

Closed ReneTC closed 3 years ago

ReneTC commented 4 years ago

Would love some tips on how to use to find errors using n-gram data. I downloaded the data, and extraded it.

image

In the folder, there is an en/ folder. Is that correct? I don't see any additional suggestions compared to the online https://languagetool.org/ .. I would really love your input on this

wysiib commented 4 years ago

You cannot provide the ngrams directly using the preference shown in the screenshot. Instead, you need to provide a path to a languagetool configuration file, in which you can configure the ngram data and how it should be used. See https://dev.languagetool.org/finding-errors-using-n-gram-data, Point 4, 'Server Mode'. The Atom preference links to the configuration file mentioned there.

ReneTC commented 4 years ago

@wysiib thank you for the comment. Do you know what server they are talking about? I'm using ubuntu and don't know where and with what i should call --languageModel

wysiib commented 4 years ago

They are talking about the LanguageTool Server. The editor starts it up in the background and them communicates with it via HTTP. You do not need to call anything with that parameter, as the startup is handled by the Atom plugin. However, we pass a configuration file to the LanguageTool Server upon startup. You can use the preferences to provide a path to said configuration file. Thus, you would need to put the equivalent of --languageModel into the file. However, I currently do not know how exactly that is supposed to look and I did not find it in the LanguageTool documentation immediately ......