Proof of Concept: LanguageTool for Android

This is a custom spell checker service using LanguageTool (LT) as the backend, which has the added benefit that it can be used with any keyboard/ROM combination as long as it supports the official Google spell checking framework.

The initial idea was to run LT on Android because, well, it’s both Java. However, I am currently not able to compile LT on Dalvik, which seems to be a known bug (1) with no progress (since 2015 :interrobang:) despite the proposed fix (2) being rather trivial. :thinking:

So for the time being this will use the official LT API (3) using org.languagetool:languagetool-http-client from the official LanguageTool Java package.

Because of the nature of how spell checking in Android used to work (only checking individual words for grammar/spelling errors instead of whole sentences where LT really exceeds) the following rules will be disabled in Android 11 (and earlier) to reduce the number of false-positives:

  • EN_UNPAIRED_QUOTES
  • DE_UNPAIRED_QUOTES
  • PUNCTUATION_PARAGRAPH_END
  • UPPERCASE_SENTENCE_START

so use Android 12 and later if possible.

This is a Proof of Concept (PoC) intended to collect feedback and to see wherever there is any demand for such an app. The long term goal should be to get LT to compile/run on Android and use the API as a fallback/for premium.

What’s implemented:

  • Picky Mode
  • Mother tongue
  • Preferred languages (you really want to set this)
  • Preferred variants

What’s not implemented:

  • Custom server
  • Premium features
  • pretty much everything else

Requirements:

  • Android Oreo (8, API 26) or newer

Permissions:

  • Internet

Download:

  • Hosted on GitHub (4) because the forum won’t let me upload an APK

Disclaimer:

  • :bangbang:This is not an official LanguagTool (app) and I am not associated with LangaugeTool (company)

Links:

  1. Investigate Dalvik compatibility (Android) · Issue #330 · languagetool-org/languagetool · GitHub
  2. Investigate Dalvik compatibility · Issue #7 · loomchild/segment · GitHub
  3. https://api.languagetool.org/v2
  4. https://github.com/defkev/LanguageToolAndroid/releases/download/beta1/lta_beta1-release.apk

3 Likes

Reserved for later