Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,340 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "LanguageTool",
"description": "Check texts for style and grammar issues with LanguageTool.",
"contact": {
"name": "Fördős András",
"email": "fordosa90@gmail.com"
}
},
"host": "api.languagetoolplus.com",
"basePath": "/v2/",
"schemes": [
"https"
],
"produces": [
"application/json"
],
"paths": {
"/check": {
"post": {
"summary": "Check a text",
"description": "Check a text with LanguageTool for possible style and grammar issues.",
"operationId": "CheckAText",
"consumes": [
"application/x-www-form-urlencoded"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "header",
"name": "Content-Type",
"x-ms-summary": "Content type header",
"description": "The expected input content type.",
"required": true,
"default": "application/x-www-form-urlencoded",
"x-ms-visibility": "internal",
"type": "string"
},
{
"in": "formData",
"name": "text",
"x-ms-summary": "Text to be checked",
"description": "The text to be checked. This or 'text (JSON)' is required.",
"required": false,
"type": "string"
},
{
"in": "formData",
"name": "data",
"x-ms-summary": "Text to be checked (JSON)",
"description": "The text to be checked, given as a JSON document that specifies what's text and what's markup. This or 'text' is required.",
"required": false,
"type": "string"
},
{
"in": "formData",
"name": "language",
"x-ms-summary": "Language code, e.g. 'en-AU'",
"description": "A language code like en-US, de-DE, fr, or auto. For English and German, a specific variant has to be chosen.",
"required": true,
"type": "string",
"default": "auto"
},
{
"in": "formData",
"name": "motherTongue",
"x-ms-summary": "Mother tongue of content writer",
"description": "A language code of the user's native language, enabling false friends checks if needed.",
"required": false,
"type": "string",
"x-ms-visibility": "advanced"
},
{
"in": "formData",
"name": "preferredVariants",
"x-ms-summary": "Preferred variants",
"description": "Comma-separated list of preferred language variants, most important when using 'auto' detected language.",
"required": false,
"type": "string",
"x-ms-visibility": "advanced"
},
{
"in": "formData",
"name": "level",
"x-ms-summary": "Level of check",
"description": "If set to 'picky', additional rules will be activated, i.e. rules found useful for formal texts.",
"required": false,
"type": "string",
"default": "default",
"enum": [
"default",
"picky"
],
"x-ms-visibility": "advanced"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"language": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the requested language or variant.",
"title": "Name"
},
"code": {
"type": "string",
"description": "Code of the requested language or variant.",
"title": "Code"
},
"detectedLanguage": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the detected language or variant.",
"title": "Name (Detected)"
},
"code": {
"type": "string",
"description": "Code of the detected language or variant.",
"title": "Code (Detected)"
},
"confidence": {
"type": "number",
"format": "float",
"description": "Confidence of the language detection.",
"title": "Confidence (Detected)"
}
}
}
},
"description": "Details of the language.",
"title": "Language"
},
"matches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Description of the identified issue.",
"title": "Message"
},
"shortMessage": {
"type": "string",
"description": "Short summary of the identified issue.",
"title": "Short Message"
},
"offset": {
"type": "integer",
"format": "int32",
"description": "Starting index in text of the identified issue.",
"title": "Target Offset"
},
"length": {
"type": "integer",
"format": "int32",
"description": "Character length in text of the identified issue.",
"title": "Target Length"
},
"replacements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Identified potential replacement.",
"title": "Value"
}
}
},
"description": "Array of potential replacements.",
"title": "Replacement"
},
"context": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Sample of contextual text for the issue.",
"title": "Text"
},
"offset": {
"type": "integer",
"format": "int32",
"description": "Starting index in sample text of the identified issue.",
"title": "Offset"
},
"length": {
"type": "integer",
"format": "int32",
"description": "Character length in sample text of the identified issue.",
"title": "Length"
}
},
"description": "Sample context for identified issue in input text.",
"title": "Context"
},
"sentence": {
"type": "string",
"description": "Sentence containing the identified issue in input text.",
"title": "Sentence"
},
"rule": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the rule.",
"title": "Id"
},
"description": {
"type": "string",
"description": "Short description of the rule.",
"title": "Description"
},
"category": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the category.",
"title": "Id"
},
"name": {
"type": "string",
"description": "Name of the category.",
"title": "Name"
}
},
"description": "Categorization of the rule.",
"title": "Category"
},
"subId": {
"type": "string",
"description": "Sub ID of the rule.",
"title": "Sub Id"
},
"issueType": {
"type": "string",
"description": "Type of the issue targeted by the rule.",
"title": "Type"
}
},
"description": "Details of the used checking rule for the issue.",
"title": "Rule"
}
}
},
"description": "Array of potential errors and warnings.",
"title": "Warning"
}
}
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Error"
}
}
}
},
"/languages": {
"get": {
"summary": "Get a list of supported languages",
"description": "Get a list of supported languages and their variants.",
"operationId": "ListLanguages",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "object",
"title": "Language",
"properties": {
"name": {
"type": "string",
"description": "Name of the language or variant.",
"title": "Name"
},
"code": {
"type": "string",
"description": "Language code, e.g. 'en' for English and its variants.",
"title": "Code"
},
"longCode": {
"type": "string",
"description": "Full language code, e.g. 'en-AU' for 'English (Australian)'.",
"title": "Long Code"
}
}
}
}
},
"400": {
"description": "Bad Request"
},
"500": {
"description": "Internal Error"
}
}
}
}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {},
"security": [],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://languagetool.org/"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://languagetool.org/legal/privacy"
},
{
"propertyName": "Categories",
"propertyValue": "IT Operations;Productivity"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"properties": {
"connectionParameters": {},
"iconBrandColor": "#da3b01",
"capabilities": [],
"publisher": "Fördős András",
"stackOwner": "LanguageTool"
}
}
22 changes: 22 additions & 0 deletions independent-publisher-connectors/LanguageTool/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# LanguageTools
LanguageTool is a free and open-source grammar, style, and spell checker, currently working for English, Spanish and 20 other languages. It also provides subscription based additional premium features, such as personal dictionaries or additional error checks.

## Publisher: Fördős András

## Prerequisites
There are currently no prerequisites to use this service.

## Obtaining Credentials
There are no credentials needed to use this service.

## Supported Operations
### Check a text
The main feature of the service - check a text with LanguageTool for possible style and grammar issues.

### Get a list of supported languages
List the available supported languages and their variants by the service.

## Known Issues and Limitations
The current version of the connector supports only the free services. If needed, we can have a discussion to bring in the premium features too, within an upgraded version.

The underlying service has limitations, described here: [https://languagetool.org/http-api/#/default](https://languagetool.org/http-api/#/default)