LanguageTool
Open source proofreading software for grammar and spell checking
Overview
LanguageTool is an open-source multilingual grammar, style, and spell checker that serves as a powerful alternative to proprietary writing assistants. Originally developed as a Java-based application, it has evolved into a comprehensive proofreading platform that supports over 30 languages and provides detailed grammatical analysis, style suggestions, and contextual spell checking. The software uses rule-based checking combined with statistical language models to detect errors that simple spell checkers miss, making it particularly valuable for professional writing, academic work, and content creation across multiple languages.
This Docker deployment leverages the erikvl87/languagetool image to provide a self-hosted HTTP API server that processes text through RESTful endpoints. The configuration includes memory optimization settings and support for n-gram datasets, which significantly improve the quality of suggestions by providing statistical context for word usage patterns. The containerized setup eliminates the complexity of Java environment management while providing a scalable backend that can serve multiple clients simultaneously.
This stack is ideal for organizations requiring privacy-compliant grammar checking, developers building writing applications, educational institutions needing multilingual support, and content teams who want to integrate advanced proofreading into their workflows. Unlike cloud-based alternatives, this self-hosted solution keeps sensitive documents within your infrastructure while providing enterprise-grade language processing capabilities that can be customized with additional rules and language models.
Key Features
- RESTful API server with /v2/check endpoint for programmatic text analysis and grammar checking
- Support for 30+ languages including English, German, French, Spanish, Portuguese, and many others
- N-gram statistical language model integration for context-aware suggestions and improved accuracy
- Configurable Java heap memory allocation (512MB-2GB) for handling large documents and concurrent requests
- Rule-based grammar checking with over 4,000 error patterns for comprehensive text analysis
- Style and tone suggestions beyond basic grammar, including wordiness and clarity improvements
- Compatible backend for browser extensions, LibreOffice, and third-party writing applications
- JSON response format with detailed error positioning, suggestions, and confidence ratings
Common Use Cases
- 1Self-hosted grammar checking service for enterprises with strict data privacy requirements
- 2Backend API for custom writing applications, content management systems, and editorial workflows
- 3Educational institutions providing multilingual writing assistance without external data sharing
- 4Content marketing teams needing consistent proofreading across multiple languages and writers
- 5Technical documentation teams integrating automated grammar checking into CI/CD pipelines
- 6Publishing companies requiring advanced style checking and editorial consistency tools
- 7Government agencies needing compliant language processing without cloud dependencies
Prerequisites
- Minimum 2GB RAM available for Java heap allocation and n-gram model loading
- Port 8010 available for LanguageTool HTTP API server (configurable via LT_PORT environment variable)
- At least 1GB disk space for n-gram language models and application data
- Basic understanding of REST API integration for connecting client applications
- Network access for downloading n-gram datasets during initial setup
- Java application troubleshooting knowledge for memory tuning and performance optimization
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 languagetool: 3 image: erikvl87/languagetool:latest4 container_name: languagetool5 restart: unless-stopped6 ports: 7 - "${LT_PORT:-8010}:8010"8 environment: 9 - langtool_languageModel=/ngrams10 - Java_Xms=512m11 - Java_Xmx=2g12 volumes: 13 - ./ngrams:/ngrams.env Template
.env
1# LanguageTool Configuration2LT_PORT=8010Usage Notes
- 1API at http://localhost:8010
- 2POST text to /v2/check endpoint
- 3Download ngrams for better suggestions
- 4Browser extensions can use local server
- 5Supports 30+ languages
- 6Set as LibreOffice/Firefox extension backend
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 languagetool:5 image: erikvl87/languagetool:latest6 container_name: languagetool7 restart: unless-stopped8 ports:9 - "${LT_PORT:-8010}:8010"10 environment:11 - langtool_languageModel=/ngrams12 - Java_Xms=512m13 - Java_Xmx=2g14 volumes:15 - ./ngrams:/ngrams16EOF1718# 2. Create the .env file19cat > .env << 'EOF'20# LanguageTool Configuration21LT_PORT=801022EOF2324# 3. Start the services25docker compose up -d2627# 4. View logs28docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/languagetool/run | bashTroubleshooting
- OutOfMemoryError during startup: Increase Java_Xmx value beyond 2g or reduce n-gram model size in ./ngrams volume
- API returns empty suggestions: Verify n-gram models are properly mounted and downloaded to ./ngrams directory
- High memory usage with multiple requests: Adjust Java_Xms and Java_Xmx values based on concurrent usage patterns
- Language detection fails: Explicitly specify language parameter in API requests rather than relying on auto-detection
- Slow response times on large texts: Break documents into smaller chunks or increase Java heap allocation
- Container fails to start: Check that ./ngrams directory exists and has proper permissions for volume mounting
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
languagetool
Tags
#grammar#spelling#writing#proofreading#nlp
Category
Productivity & CollaborationAd Space
Shortcuts: C CopyF FavoriteD Download