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

Use languagetool-commandline.cmd installed in the system in windows #93

Open
xarthurx opened this issue Oct 21, 2020 · 2 comments
Open

Comments

@xarthurx
Copy link

Hi, I have the languagetool installed in windows by scoop and it provides a command languagetool-commandline.cmd that can be executed in windows cmd/powershell.

Would it be possible to have a detection mechanism for grammarous to use that directly and not download the java package?
I always get an error of || vim-grammarous: Grammar check failed: Error: Unable to access jarfile ... when using the plugin to check grammar.

@crile
Copy link

crile commented Dec 11, 2020

Do you have tried to add this line in your vim configuration :

let g:grammarous#languagetool_cmd='languagetool-commandline.cmd'

@xarthurx
Copy link
Author

OK, I tried adding that line, now VIM gives me:

|| vim-grammarous: Grammar check failed: Working on C:\\Users\\xarthur\\AppData\\Local\\Temp\\nvimcmRY2k\\6...^M
|| Exception in thread "main" java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError^M
|| ^Iat org.languagetool.MultiThreadedJLanguageTool.analyzeSentences(MultiThreadedJLanguageTool.java:149)^M
|| ^Iat org.languagetool.JLanguageTool.check(JLanguageTool.java:890)^M
|| ^Iat org.languagetool.JLanguageTool.check(JLanguageTool.java:864)^M
|| ^Iat org.languagetool.commandline.CommandLineTools.checkText(CommandLineTools.java:108)^M
|| ^Iat org.languagetool.commandline.CommandLineTools.checkText(CommandLineTools.java:84)^M
|| ^Iat org.languagetool.commandline.Main.runOnFile(Main.java:192)^M
|| ^Iat org.languagetool.commandline.Main.main(Main.java:464)^M
|| Caused by: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError^M
|| ^Iat java.util.concurrent.ForkJoinTask.get(Unknown Source)^M
|| ^Iat org.languagetool.MultiThreadedJLanguageTool.analyzeSentences(MultiThreadedJLanguageTool.java:142)^M
|| ^I... 6 more^M
|| Caused by: java.lang.OutOfMemoryError^M
|| ^Iat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)^M
|| ^Iat sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)^M
|| ^Iat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)^M
|| ^Iat java.lang.reflect.Constructor.newInstance(Unknown Source)^M
|| ^Iat java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)^M
|| ^I... 8 more^M
|| Caused by: java.lang.OutOfMemoryError: Java heap space^M
|| ^Iat java.io.BufferedInputStream.fill(Unknown Source)^M
|| ^Iat java.io.BufferedInputStream.read1(Unknown Source)^M
|| ^Iat java.io.BufferedInputStream.read(Unknown Source)^M
|| ^Iat java.io.FilterInputStream.read(Unknown Source)^M
|| ^Iat java.io.PushbackInputStream.read(Unknown Source)^M
|| ^Iat java.util.zip.InflaterInputStream.fill(Unknown Source)^M
|| ^Iat java.util.zip.InflaterInputStream.read(Unknown Source)^M
|| ^Iat java.util.zip.ZipInputStream.read(Unknown Source)^M
|| ^Iat java.io.DataInputStream.readFully(Unknown Source)^M
|| ^Iat java.io.DataInputStream.readLong(Unknown Source)^M
|| ^Iat java.io.DataInputStream.readDouble(Unknown Source)^M
|| ^Iat opennlp.tools.ml.model.BinaryFileDataReader.readDouble(BinaryFileDataReader.java:51)^M
|| ^Iat opennlp.tools.ml.model.AbstractModelReader.readDouble(AbstractModelReader.java:73)^M
|| ^Iat opennlp.tools.ml.model.AbstractModelReader.getParameters(AbstractModelReader.java:142)^M
|| ^Iat opennlp.tools.ml.maxent.io.GISModelReader.constructModel(GISModelReader.java:78)^M
|| ^Iat opennlp.tools.ml.model.GenericModelReader.constructModel(GenericModelReader.java:62)^M
|| ^Iat opennlp.tools.ml.model.AbstractModelReader.getModel(AbstractModelReader.java:85)^M
|| ^Iat opennlp.tools.util.model.GenericModelSerializer.create(GenericModelSerializer.java:32)^M
|| ^Iat opennlp.tools.util.model.GenericModelSerializer.create(GenericModelSerializer.java:29)^M
|| ^Iat opennlp.tools.util.model.BaseModel.finishLoadingArtifacts(BaseModel.java:312)^M
|| ^Iat opennlp.tools.util.model.BaseModel.loadModel(BaseModel.java:242)^M
|| ^Iat opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:176)^M
|| ^Iat opennlp.tools.postag.POSModel.<init>(POSModel.java:97)^M
|| ^Iat org.languagetool.chunking.EnglishChunker.<init>(EnglishChunker.java:65)^M
|| ^Iat org.languagetool.language.English.createDefaultChunker(English.java:114)^M
|| ^Iat org.languagetool.Language.getChunker(Language.java:437)^M
|| ^Iat org.languagetool.JLanguageTool.getRawAnalyzedSentence(JLanguageTool.java:1351)^M
|| ^Iat org.languagetool.JLanguageTool.getAnalyzedSentence(JLanguageTool.java:1317)^M
|| ^Iat org.languagetool.MultiThreadedJLanguageTool$AnalyzeSentenceCallable.call(MultiThreadedJLanguageTool.java:205)^M
|| ^Iat org.languagetool.MultiThreadedJLanguageTool$AnalyzeSentenceCallable.call(MultiThreadedJLanguageTool.java:196)^M
|| ^Iat java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(Unknown Source)^M
|| ^Iat java.util.concurrent.ForkJoinTask.doExec(Unknown Source)^M

on checking some English files.

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

2 participants