A local, open-source French spelling and grammar checker for Android, powered by Grammalecte.
All correction runs on-device. The application does not request the Android INTERNET permission and does not use a cloud API or LLM.
Project status: early development, but the correction engine is functional on a physical Android device. Native spell-checking,
PROCESS_TEXTcorrection and an IME-based fallback have all been validated during development.
Grammalecte Android currently exposes the same local correction engine through three Android integration paths:
-
SpellCheckerService
- native Android spelling and grammar suggestions;
- integrates automatically in applications that support the platform spell-checker framework.
-
ACTION_PROCESS_TEXT
- adds a Corriger avec Grammalecte action to Android's selected-text menu;
- opens a correction screen with explanations and individual suggestions;
- can return corrected text to compatible applications;
- falls back to copying corrected text when Android exposes the selection as read-only.
-
Grammalecte IME
- a correction-oriented
InputMethodService; - reads the currently selected text through
InputConnection; - applies corrections directly to the active editable field;
- provides a fallback for applications that bypass
SpellCheckerServiceor ignorePROCESS_TEXTreplacement results.
- a correction-oriented
The current IME is intentionally focused on correcting selected text. It is not intended to replace a full-featured typing keyboard.
Android applications do not all expose text correction in the same way.
A standard EditText can use Android's native spell-checker service, while some custom editors and web fields never call it.
PROCESS_TEXT works in many applications, but some editors do not accept returned replacement text.
The IME fallback uses Android's normal InputConnection editing interface instead of an Accessibility Service. This keeps the replacement mechanism generic across editable applications while avoiding the broader permissions and privacy surface of accessibility automation.
Manual development tests have successfully applied real Grammalecte corrections in:
- Android native text fields;
- SMS editing;
- Samsung Notes;
- Firefox text fields.
Compatibility testing is still ongoing.
The project is split into four Gradle modules:
| Module | Responsibility |
|---|---|
core |
Pure Kotlin domain API: GrammarEngine, issues, ranges and normalization. |
engine-grammalecte |
QuickJS runtime, Grammalecte JavaScript bridge, dictionaries and mapping to the internal correction model. |
spellchecker |
Android SpellCheckerService integration and mapping to Android suggestion objects. |
app |
Application UI, setup tools, PROCESS_TEXT, IME integration and final Android packaging. |
The correction engine remains isolated behind the GrammarEngine contract even though Android can reach it through several framework integrations.
See docs/architecture.md and docs/adr/ for the detailed design decisions.
The repository vendors a pinned generated Grammalecte JavaScript runtime and Graphspell dictionaries.
The upstream revision is recorded in tools/grammalecte.env.
The current vendoring workflow is reproducible and tied to an immutable upstream commit.
Normal builds do not need to regenerate the engine.
Regeneration is only required when deliberately updating or rebuilding the vendored Grammalecte assets:
./tools/vendor-grammalecte.sh
Requirements:
- JDK 17
- Android SDK 36
- Git
- Node.js 20+ for the JavaScript bridge contract test
- Python 3.11 when regenerating the Grammalecte assets
The Gradle wrapper is committed to the repository.
Run the main checks and build:
./gradlew --no-daemon \
ktlintCheck \
:core:test \
:engine-grammalecte:test \
:spellchecker:test \
:app:lintDebug \
:app:assembleDebug
The debug APK is generated under:
app/build/outputs/apk/debug/
For development on a connected Android device:
./tools/run-android.sh
The script builds the debug APK, installs it with ADB and launches the application.
After installing the APK, open Android settings and select Grammalecte Android as the system spell checker.
The exact path depends on the Android distribution, but is generally similar to:
Settings
→ System
→ Languages and input
→ Spell checker
The application also provides a shortcut to the relevant Android settings screen.
In a compatible application:
- select some text;
- open the Android text-selection menu;
- choose Corriger avec Grammalecte;
- review the detected issues and suggestions;
- return the corrected text to the application, or copy it when the source selection is read-only.
Android exposes the correction fallback as an input method named Grammalecte.
Once enabled in Android's keyboard/input-method settings:
- select text in an editable field;
- switch temporarily to the Grammalecte input method;
- review and apply the proposed corrections;
- switch back to the usual keyboard.
A more polished activation and keyboard-switching workflow is planned before public distribution.
The application intentionally declares no android.permission.INTERNET permission.
A CI check fails if that permission appears in one of the project manifests.
This is particularly important for a spell checker or input method because selected or typed text can contain private messages, emails, searches and form data.
The current design therefore keeps correction entirely local:
Android text
↓
local Kotlin code
↓
embedded QuickJS runtime
↓
embedded Grammalecte engine
↓
local correction result
No text is sent to an external service.
Engine updates should be isolated and reviewable:
- update
GRAMMALECTE_COMMITandGRAMMALECTE_VERSIONintools/grammalecte.env; - run
./tools/vendor-grammalecte.sh; - run the complete test suite;
- inspect the generated asset diff;
- verify upstream license metadata;
- add or update regression tests when correction behavior changes.
Do not track an upstream branch dynamically at build time.
The repository contains GitHub Actions workflows for:
- Kotlin formatting and unit tests;
- Android lint;
- debug APK builds;
- privacy checks;
- shell script validation;
- JavaScript bridge contract tests;
- vendored Grammalecte engine smoke tests;
- Android instrumentation tests.
Dependabot monitors project dependencies, while the Gradle wrapper is deliberately updated manually because its version and distribution checksum are kept in sync with the project's bootstrap and CI configuration.
ROADMAP.mdCHANGELOG.mdCONTRIBUTING.mdSECURITY.mdTHIRD_PARTY_NOTICES.mddocs/architecture.mddocs/testing.mddocs/release.mddocs/adr/
This is an unofficial Android integration of Grammalecte.
It is not affiliated with or endorsed by the Grammalecte project or Algoo.
The Android package namespace is intentionally marked unofficial during the current development phase and should be reviewed before the first stable public release.
This project is licensed under GPL-3.0-only.
Grammalecte is distributed under GPLv3 and its upstream license information is preserved with the vendored sources and metadata.
QuickJS-KT is distributed under the Apache License 2.0.