dpelle / vim-LanguageTool

A vim plugin for the LanguageTool grammar checker
281 stars 28 forks source link

When I run :LanguageToolCheck, the output is the java -jar command in a new buffer #29

Closed GregePorter closed 3 years ago

GregePorter commented 3 years ago

After specifying the location of the languagetool_jar (and running :PlugInstall, of course), when I run :LanguageToolCheck, instead of getting the expected Grammar suggestions, I get the java -jar command in a new buffer.

DE2gK

I've made sure I have updated Java and the update LanguageTool jar

GregePorter commented 3 years ago

Ok, I read through the documentation more and that the buffer is expected. You'll see the java command and then below, the suggestions:

errors

So, then, what am I missing in the first example that its missing the misspellings?

GregePorter commented 3 years ago

Ok, I think the problem in my first example was partially because I didn't set a specific language so "txt" wasn't being picked up. Once I set the default language to American English, it was detected.

"Tings" was not detected because that is a word and "right good" is also not false per se; I was expecting it to suggest "write good" or even better "write well".

dpelle commented 3 years ago

In your second screenshot, you got the plugin working working. However, on your sceeenshot, I only see grammar mistakes highlighteed and not spelling mistakes.

Try:

:set spelllang=en_us
:LanguageToolCheck

This is what I see: languagetool-en_us

Your sample file isn't really good at judging a grammar checker as there are so many errors (mostly spelling) that we can hardly find grammar mistakes.

GregePorter commented 3 years ago

Yep yep! I was indeed missing setting the language to American English (in my case, that is).

So, cool, I tried another smaller example with a grammatical error, and it looked like it picked one of the two up.

Screen Shot 2021-10-29 at 9 20 23 AM

To compare, it seems like something like Grammarly makes a number of suggestions that are missing from LanguageTool. Is this a limitation of the LT?

Screen Shot 2021-10-29 at 9 20 59 AM
dpelle commented 3 years ago

Glad it work. Have fun with it :-)

@GregePorter wrote:

To compare, it seems like something like Grammarly makes a number of suggestions that are missing from LanguageTool. Is this a limitation of the LT?

The Vim plugin only interfaces with LanguageTool (LT). The plugin only launches LT and shows in Vim the error found by LT. If some errors are missed (false negative) or spurious error are found (false positive), it's LanguageTool which is responsible for this (not the plugin).

When comparing LT with other grammar checkers, keep in mind that the goal is not always detect a maximum number of errors, but rather to detect a maximum number or real errors and minimum number of false errors. Checkers that give too many false positive can be very annoying, causing users to loose trust or abandon the tool. So when the checker can't be sure enough that it's an error, it's better to not signal it.

If you have suggestions when comparing LT with other grammar checker, you can write in the LanguageTool forum at https://forum.languagetool.org/

The main strengths of LanguageTool are in my opinion:

GregePorter commented 3 years ago

Ok, that makes totally sense @dpelle ! Thanks for the help and responses! And, I'm sorry, I didn't mean to disparage the plugin (it's awesome) or LT :)

I totally agree about the strengths that you bring up. Maybe I'm greedy for suggestions cause I know my grammar is poor sometimes :P

Thanks again!

dpelle commented 3 years ago

cause I know my grammar is poor sometimes

And mine too :-) My native language being French. I'm glad whenever users find the plugin useful.