Sunday, October 7, 2012

Re: LanguageTool plugin issue [was Re: vim, spell check, smart quotes]

Chris Lott <chris@chrislott.org> wrote:

On Sat, Oct 6, 2012 at 10:15 PM, Dominique Pellé
<dominique.pelle@gmail.com> wrote:
>
> Or you can also use the LanguageTool plugin
> which not only does grammar checking in Vim but
> now also does spell checking (since LanguageTool
> version 1.8) using either Hunspell of FSA (Finate
> State Automaton http://stevehanov.ca/blog/index.php?id=115)
> dictionaries:
>
> http://www.vim.org/scripts/script.php?script_id=3223

This looks like the most intriguing route. However, after installation
of the plugin, I get the following error:

java -jar /Users/chrislott/Dropbox/apps/unix/languagetool/LanguageTool.jar
-c utf-8 -d WHITESPACE_RULE,EN_QUOTES -l en --api /var/f
olders/y3/tfx06t6d0kx425gqyhrgv4nw0000gp/T/v6Jgs8o/0] failed with error: 1

Any idea how to troubleshoot this?

Not sure what it is. That seems to be a problem with
the installation of LanguageTool or Java, but not with Vim.
Anyway, does this work for you from the shell command
line for example:

$ echo "This is is a test." | \
   java -jar languagetool//dist/LanguageTool.jar -l en-US

Expected text language: English (US)
Working on STDIN...
1.) Line 1, column 6, Rule ID: ENGLISH_WORD_REPEAT_RULE
Message: Possible typo: you repeated a word
Suggestion: is
This is is a test.
     ^^^^^        
Time: 104ms for 1 sentences (9.6 sentences/sec)

By the way, spell checking with LanguageTool only
happens if the region is selected. In other word with
language en-US or en-UK (but not with "en").
In Vim setting:  :spelllang=en_us  should be enough
for the plugin to pass the right language to LanguageTool.

Regards
-- Dominique


-- Dominique

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment