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

Cannot use n-grams on Windows #313

Closed
marvin-te opened this issue Oct 15, 2024 · 1 comment
Closed

Cannot use n-grams on Windows #313

marvin-te opened this issue Oct 15, 2024 · 1 comment
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label)

Comments

@marvin-te
Copy link

Describe the bug
Hi there,
I would like to use n-gram data on my windows machine with the helix-editor. Sadly though, things don't quite work out. I just don't get any error markup anymore, when adding the appropriate config.

I hope you can help me with this.

Steps to reproduce

  1. Have a working installation of ltex-ls and want to expand it's functionality by using n-grams

  2. Extract files to desired directory (in my case the German n-grams are extracted in C:\Sandbox\lt-ngrams\de\{1grams,2grams,3grams}\...

  3. Add config to C:\Users\<username>\AppData\Roaming\helix\languages.toml:

[language-server.ltex.config.ltex]
language = "de-DE"
additionalRules.motherTongue = "de-DE"
additionalRules.languageModel = "C:\\Sandbox\\lt-ngrams"
  1. Type :lsp-restart into helix

Expected behavior
I get more suffisticated corrections.

Actual behavior
I do not get any error corrections anymore.

Logs upon LSP restart

2024-10-15T11:42:21.155 helix_lsp::transport [ERROR] ltex err <- "SLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".\r\n"
2024-10-15T11:42:21.155 helix_lsp::transport [ERROR] ltex err <- "SLF4J: Defaulting to no-operation (NOP) logger implementation\r\n"
2024-10-15T11:42:21.155 helix_lsp::transport [ERROR] ltex err <- "SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.\r\n"
2024-10-15T11:42:27.016 helix_lsp::transport [ERROR] ltex err <- "Okt. 15, 2024 11:42:27 VORM. org.bsplines.ltexls.server.LtexLanguageServer initialize\r\n"
2024-10-15T11:42:27.016 helix_lsp::transport [ERROR] ltex err <- "INFORMATION: ltex-ls 16.0.0 - initializing...\r\n"
2024-10-15T11:42:27.083 helix_lsp::transport [ERROR] ltex err <- "Okt. 15, 2024 11:42:27 VORM. org.bsplines.ltexls.settings.SettingsManager$Companion logDifferentSettings\r\n"
2024-10-15T11:42:27.083 helix_lsp::transport [ERROR] ltex err <- "FEIN: Reinitializing LanguageTool due to different settings for language 'de-DE': setting 'settings', old 'null', new 'non-null'\r\n"

Logs upon document edit

2024-10-15T11:52:19.995 helix_lsp::transport [ERROR] ltex err <- "Okt. 15, 2024 11:52:19 VORM. org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\r\n"
2024-10-15T11:52:19.995 helix_lsp::transport [ERROR] ltex err <- "WARNUNG: Skipping text check as LanguageTool has not been initialized\r\n"
2024-10-15T11:52:20.300 helix_lsp::transport [ERROR] ltex err <- "Okt. 15, 2024 11:52:20 VORM. org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\r\n"
2024-10-15T11:52:20.300 helix_lsp::transport [ERROR] ltex err <- "WARNUNG: Skipping text check as LanguageTool has not been initialized\r\n"
2024-10-15T11:52:20.932 helix_lsp::transport [ERROR] ltex err <- "Okt. 15, 2024 11:52:20 VORM. org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\r\n"
2024-10-15T11:52:20.932 helix_lsp::transport [ERROR] ltex err <- "WARNUNG: Skipping text check as LanguageTool has not been initialized\r\n"
2024-10-15T11:52:21.463 helix_lsp::transport [ERROR] ltex err <- "Okt. 15, 2024 11:52:21 VORM. org.bsplines.ltexls.server.DocumentChecker checkAnnotatedTextFragment\r\n"
2024-10-15T11:52:21.463 helix_lsp::transport [ERROR] ltex err <- "WARNUNG: Skipping text check as LanguageTool has not been initialized\r\n"

Version information
List here the version information of the relevant software.

  • Operating system: Windows 10
  • ltex-ls: 16.0.0
  • Java: OpenJDK Runtime Environment Temurin-17.0.5

Additional context/information
You can add any other context or information about the problem here.

@marvin-te marvin-te added 1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label) labels Oct 15, 2024
@marvin-te marvin-te changed the title Cannot use n-grams in Windows Cannot use n-grams on Windows Oct 15, 2024
@marvin-te
Copy link
Author

Ok, I think I can close this issue. It was a problem with the 20241009 version of the German ngram archive from languagetool.org. For some reason, everytime I download it, it is broken, showing varying checksums. Sometimes unzipping works, but breaks ltex-ls, sometimes unzipping doesn't even work.

Using the 20150819 version works without problem. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label)
Projects
None yet
Development

No branches or pull requests

1 participant