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

Error: codec footer mismatch #58

Open
arladmin opened this issue Dec 27, 2022 · 0 comments
Open

Error: codec footer mismatch #58

arladmin opened this issue Dec 27, 2022 · 0 comments

Comments

@arladmin
Copy link

arladmin commented Dec 27, 2022

I'm running the provided docker-compose.yml file on my local system, with downloaded n-grams dataset.

---

version: "3"

services:
  languagetool:
    image: erikvl87/languagetool
    container_name: languagetool
    ports:
      - 8710:8010                        # Using default port from the image
    environment:
      - langtool_languageModel=/ngrams   # OPTIONAL: Using ngrams data
      - Java_Xms=2g                    # OPTIONAL: Setting a minimal Java heap size of 512 mib
      - Java_Xmx=4g                      # OPTIONAL: Setting a maximum Java heap size of 1 Gib
    volumes:
      - ./ngrams:/ngrams     # OPTIONAL: The location of ngrams data on the local machine

When trying out an API call to the check endpoint, i'm seeing the below given error.
API call:

curl --location --request POST 'http://localhost:8710/v2/check' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'text=<my text data>' \
--data-urlencode 'language=en-GB'

Error->

Error: Internal Error: java.lang.RuntimeException: org.apache.lucene.index.CorruptIndexException: codec footer mismatch (file truncated?): actual footer=0 vs expected footer=-1071082520 (resource=MMapIndexInput(path="/ngrams/en/3grams/_1e4_Lucene50_0.tim")), detected: en-US

Could use some guidance regarding diagnosing and resolving this issue.

Thanks.


Update:
When i comment out - langtool_languageModel=/ngrams, the API call goes through successfully.

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

1 participant