LanguageTool Service (Python)
This document describes the Flask application serving as a microservice for checking text for grammar and style errors using LanguageTool.
Overview
This Flask application provides an API to check text for grammar and style errors using the pylanguagetool library. It's a simple service that can be used by other services in the ChainAlign ecosystem to improve the quality of text content.
Key Functionalities Exposed:
- Receiving text content.
- Using LanguageTool to check the text for errors.
- Returning a list of matches.
Technology Stack:
- Flask: For creating the web server and API endpoints.
- pylanguagetool: The core library for checking text.
API Endpoints
POST /check-text
Checks text for grammar and style errors.
Request Body:
{
"text": "The text content to be checked."
}
Responses:
200 OK: A JSON object with a list of matches.400 Bad Request: If the request body is invalid.