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

Feat: Improve supporting LanguageTool local server #1166

Merged
merged 8 commits into from
Nov 12, 2024

Conversation

miurahr
Copy link
Member

@miurahr miurahr commented Oct 27, 2024

A code to launch local LanguageTool server from OmegaT has not been maintained in many years.
This improves handling of local LanguageTool server launcher, to add necessary arguments, catch connection error.

Also allow specifying ngram files for LT server.

Pull request type

  • Feature enhancement -> [enhancement]

Which ticket is resolved?

What does this PR change?

  • Update Preferences > LanguageTool > Local Server Jar to accept folder path that have language model files
  • Catch HTTP connection error and handling the error properly, instead of dumping stacks
  • Put heap memory option to java
  • Put --public to LT server
  • Put --allow-origin to LT server (Handle CORS)
  • Automatically select an unused port instead of default 8081 only
  • Default language model (ngram) paths
    • windows: \\user\<YourUserName>\AppData\Roaming\languagetool.org\LanguageTool\ngrams
    • Linux: $HOME/.local/share/LanguageTool/ngrams
    • macOS: /Library/Application-Support/LanguageTool/ngrams

Other information

- introduce getLanguageModelDefaultPath()

Signed-off-by: Hiroshi Miura <[email protected]>
Change to $HOME/.local/share/LanguageTool/ngrams

Signed-off-by: Hiroshi Miura <[email protected]>
Improve readability with serverCommands private method and startServer private method

Signed-off-by: Hiroshi Miura <[email protected]>
and ignore connection errors.

Improve readability with serverCommands private method and startServer private method

Signed-off-by: Hiroshi Miura <[email protected]>
@miurahr
Copy link
Member Author

miurahr commented Nov 12, 2024

No review feedback over 2 weeks.

@miurahr miurahr merged commit 7e09a34 into master Nov 12, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

1 participant