language_tool_python
Checks grammar using LanguageTool.
What it is and what it does
language_tool_python is a Python interface to LanguageTool, an open-source grammar, style, and spell checker. It lets you run grammar checks from Python code or the command line, with three deployment options: a local LanguageTool Java server (default version 6.8), the public LanguageTool API, or your own remote server. The wrapper handles server lifecycle, text checking, auto-correction, and fine-grained rule/category control.
The package depends on requests for HTTP calls, tqdm for progress feedback, packaging for version handling, psutil for system monitoring, and toml for configuration. It supports Python 3.9 through 3.14 and offers both programmatic and CLI interfaces, making it suitable for batch text processing, integration into larger NLP pipelines, or standalone grammar validation tools.
Use it for:
- Batch-check documents or code comments for grammar and spelling errors in an automated pipeline.
- Build a CLI tool or web service that validates user-submitted text against grammar and style rules.
- Integrate grammar checking into a documentation generator or content management system.
- Detect and correct typos and grammatical issues in multilingual text with configurable language rules.
- Develop domain-specific spell-checkers by registering custom spellings and disabling irrelevant rules.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python wrapper for LanguageTool that checks grammar, style, and spelling in text via a local Java server, public API, or remote server.
Yes, with a licensing caveat. The package is well-maintained, has low install friction, no known vulnerabilities, and provides a mature interface to a powerful grammar checker. However, its GPL-3.0-only license means you cannot use it in proprietary or closed-source projects without a separate commercial license. For open-source or internal tools, it is a solid choice.
Install
language-tool-python on PyPI
pip
pip install language-tool-pythonuv
uv add language-tool-pythonpoetry
poetry add language-tool-pythonInstalling language_tool_python
Before you install
Low install friction with a pure-Python wheel. Maintenance is active with a recent release (92 days ago) and steady repository activity. Runtime dependencies are lightweight and widely used (requests, tqdm, packaging, psutil, toml).
License in practice
Licensed under GPL-3.0-only (copyleft). Any software that links or distributes this package must also be released under GPL-3.0 or compatible terms; proprietary or closed-source projects cannot use it without a separate license agreement.
Quickstart
pip install language_tool_python
import language_tool_python
with language_tool_python.LanguageTool("en-US") as tool:
matches = tool.check("This are bad.")
print(tool.correct("This are bad."))
Java >= 17 required for the default local LanguageTool server (6.8); Java >= 9 for older versions. Python >= 3.9.
Verify before relying
- Performance characteristics when checking large documents or high-frequency API calls.
- Accuracy of grammar and spelling detection across different languages and domains.
- Latency and resource overhead of running a local Java server versus using the public API.
Package facts
| License | GPL-3.0-only (copyleft) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — requests, tqdm, packaging, psutil, toml |
| Maintenance | actively maintained — 92 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 347,561/month — #7,348 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: language_tool_python-3.4.0-py3-none-any.whl
Keywords: python, nlp, grammar, languagetool, grammar-checker, spellchecker, grammar-parser
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pyenchantPyEnchant provides Python bindings to the…
copyleft · top 5,000 on PyPI
pyspellcheckerDetects misspelled words and suggests…
permissive · top 5,000 on PyPI
typosFinds and corrects spelling mistakes in source…
permissive · top 5,000 on PyPI
pyspellingPySpelling wraps Aspell or Hunspell to automate…
permissive · top 15,000 on PyPI
sphinxcontrib-spellingA Sphinx extension that checks documentation…
permissive · top 5,000 on PyPI
codespellCodespell finds and fixes common misspellings…
copyleft · top 5,000 on PyPI
symspellpysymspellpy is a Python port of SymSpell v6.7.2…
permissive · top 15,000 on PyPI
valeVale is a command-line tool for enforcing…
permissive · top 15,000 on PyPI
mkdocs-spellcheckA spell checker plugin for MkDocs that…
permissive · top 15,000 on PyPI
ParsleyParsley is a PEG-based parsing library that…
permissive · top 5,000 on PyPI