Open sim590 opened 5 years ago
Something needs to be edited inside the JAR file; solution here: https://anwaarlabs.wordpress.com/2017/02/25/lucene-an-spi-class-of-type-org-apache-lucene-codecs-codec-with-name-does-not-exist/
I can patch the existing release, but I'll have to think of a way to automate this for future releases.
Release v0.7.1 should fix the problem. Feel free to reopen if the problem persists.
I just tested 0.7.1. It worked fine! Thanks for the quick reaction!
Thank you for the great program. Unfortunately I get exactly this error when I want to use the latest version (0.8.3) with current n-gram data. Is there a solution for this?
The new LanguageTool jar seems to have the exact same issue as the previous one. I'll reopen and try to fix it again.
I’m getting this exact error, but can’t fix it even after following the instructions at https://anwaarlabs.wordpress.com/2017/02/25/lucene-an-spi-class-of-type-org-apache-lucene-codecs-codec-with-name-does-not-exist/.
Is there a workaround simple enough for non-Java users?
I "patched" the 0.8.3 version manually and it works for me. Use at your own risk. I edited it those three files in META_INF using vim.
@bong0 Thanks for your contribution. I would like to integrate your changes in the pipeline that creates the LanguageTool fat JAR. Could you please tell me which files you modified and what changes you made to them?
Sure, hope that helps: so I added the lines listed in the diff. Let me know if there's something unclear :) [changed] META-INF/services/org.apache.lucene.codecs.PostingsFormat
❯ diff t1/**/META-INF/services/org.apache.lucene.codecs.PostingsFormat t2/**/META-INF/services/org.apache.lucene.codecs.PostingsFormat
17a18
> org.apache.lucene.codecs.lucene50.Lucene50PostingsFormat
[changed] META-INF/services/org.apache.lucene.codecs.DocValuesFormat
❯ diff t1/**/META-INF/services/org.apache.lucene.codecs.DocValuesFormat t2/**/META-INF/services/org.apache.lucene.codecs.DocValuesFormat
20a21
> org.apache.lucene.codecs.lucene54.Lucene54DocValuesFormat
[changed] META-INF/services/org.apache.lucene.codecs.Codec
❯ diff t1/**/META-INF/services/org.apache.lucene.codecs.Codec t2/**/META-INF/services/org.apache.lucene.codecs.Codec
24a25
> org.apache.lucene.codecs.lucene54.Lucene54Codec
When running the following command (file read from
stdin
):I end up with the following error:
The n-grams files were downloaded from the following URL:
https://languagetool.org/download/ngram-data/
as instructed by the LanguageTool documentation page.