Stilus API
Integrate Stilus into any publishing environment
1 What is Stilus API?
Stilus API is Stilus' developer platform designed to customize and integrate the Spanish proofreading service into any publishing environment (either proprietary or third-party).
Easy to use. Stilus API requires an Internet connection to enable user authentication and account service consumption. Requests to the API's endpoints are made through GET o POST, according to the linguistic configuration set for the proofreading.
Register at Stilus to start a free trial and try the demo. To integrate the API, read the following instructions or request a quote if you want to purchase the service. In any case, contact MeaningCloud to agree upon the proofreading volume you need.
3 Request
Requests are made using GET or POST data submissions to the API entry point. Typically, a POST method is recommended in order to overcome the parameter maximum length limit associated to the GET method. The parameters are the following:
Parameter | Description | Values | Required |
---|---|---|---|
key | The access key is required for making requests to any of our web services. You can get a valid access key for free just by creating an account at MeaningCloud. | String | Yes |
txt | Input text that's going to be analyzed. | String | Yes |
url | URL with the content to check. Currently only non-authenticated HTTP and FTP are supported. The content types supported for URL contents can be found here. | String | No |
ilang | It specifies the interface language, that is, the language in which the messages in the response will appear. | EN: english ES: spanish | No Default: ES |
mode | This field will determine how the issues are detected in the text. | all: Returns all errors found in the text. next: Returns only the first error found. In combination with the offset parameter, you can obtain, one by one, all the text errors. | No Default: all |
version | Version of the API | String | No |
if | Input format | String | No Default: html |
of | Output format | xml, json | No Default: json |
offset | Offset in which to start the revision. This functionality together with the mode=next are used when the application that calls the API needs to receive the issues in a text one by one. | Positive number from 0 to text length. | No Default: 0 |
dic | This parameter will specify the list of active dictionaries that will be used in the review. Each dictionary will be represented with a letter (detailed below). There are two types of dictionaries, thematic dictionaries, with domain specific terms, and language varieties, with terms specific to the language variety in question. | See the dictionaries section. | No Default: chetsdpqr |
pp | Smart detection of prefixed words. | y: enabled n: disabled | No Default: y |
aqoi | Smart handling of words written in italics or with quotation marks. | y: enabled n: disabled | No Default: y |
tls | Warn of too-long sentences. | y: enabled n: disabled | No Default: y |
dpn | Smart detection of proper nouns. | y: enabled n: disabled | No Default: n |
stme | Describes how it will behave when it finds sentences with many errors. | 0: Check for all 1: Group and ignore 2: Group and warn | No Default: 2 |
red | Check tautology and language misuse. | y: enabled n: disabled | No Default: y |
spa | Check spacing. | y: enabled n: disabled | No Default: y |
comppunc | Verify the opening and closing of pairs of signs. | y: enabled n: disabled | No Default: y |
corrpunc | Check punctuation marks. | y: enabled n: disabled | No Default: y |
alw | Warn of foreign words to be avoided. | y: enabled n: disabled | No Default: n |
wct | Warn of confusion between terms. | y: enabled n: disabled | No Default: n |
wps | Warn of percentage signs (%) not spaced. | y: enabled n: disabled | No Default: n |
psr | Warn of possible reduction of the consonant clusters ps-. | y: enabled n: disabled | No Default: n |
nsr | Warn of possible reduction of the consonant clusters -ns-. | y: enabled n: disabled | No Default: n |
bsr | Warn of possible reduction of the consonant clusters -bs-.. | y: enabled n: disabled | No Default: n |
str | Warn of possible reduction of the consonant clusters -st-.. | y: enabled n: disabled | No Default: n |
vr | Warn of possible vowel reductions. | y: enabled n: disabled | No Default: n |
sdm | Warn of removing the accent mark from «sólo». | y: enabled n: disabled | No Default: n |
ddm | Warn of removing the accent mark from demonstratives. | y: enabled n: disabled | No Default: n |
conf | Field that indicates the minimum confidence required in the responses. | Positive number from 0 to 100 | No Default: 60 |
3.1 Dictionaries
Language | Thematic dictionaries | Language varieties | Default value |
---|---|---|---|
Spanish |
|
|
|
4 Response
The response contains the information associated with the result of the request. You can find a description of each of its fields in the following table.
Name | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
status | Contains information about the revision process and whether it has finished successfully. It is formed by a status code code , a natural number that identifies the result, and a message (msg), a string describing the result. In addition, the field credits contains a natural number that indicates the credits consumed in the request and remaining_credits shows the number of credits left to the user to get to the credit limit.
These are the possible status codes and the associated messages:
A request is any HTTP request done to the API to analyze less than 500 words. If the text sent is longer than that, then it will be considered that more than a request is made, more specifically, as many requests as we would need if the text were divided in chunks of 500 words. For instance, an HTTP request with 1013 words, will count as three requests, so 3 credits will be consumed; an HTTP request with a text 25648 words long would count as 25648/500 = 51.296 => 52 credits, and so on. | ||||||||||||||||||||||||||||||||||||||||||||||||
result_list | List of issues (errors, warnings or recommendations) found in the text. Each one of these issues is represented in a result element that contains the following fields:
| ||||||||||||||||||||||||||||||||||||||||||||||||
stadistics | This field contains statistics of the text sent. The values included are the following:
|
5 Example
Given the following text:
No vengas hacernos creer que todos vemos los mismos reality shows en television.
The output would be:
{ "status": { "code": "0", "msg": "OK" }, "result_list": [ { "text": "vengas hacernos", "type": "G", "inip": "3", "endp": "17", "level": "B1", "rule": "ReglaVenir+INF", "msg": "Posiblemente sea necesario incluir la preposición a.", "sug_list": [ { "form": "vengas a hacernos", "confidence": "70" } ] }, { "text": "reality shows", "type": "T", "inip": "52", "endp": "64", "level": "A1", "rule": "ReglaRevisionPalabras-V", "msg": "Voz inglesa (debería ir en cursiva).", "ref": "Fundéu / El_País", "sug_list": [ { "form": "programa de telerrealidad", "confidence": "99" }, { "form": "telerrealidades", "confidence": "99" }, { "form": "programa de sucesos", "confidence": "99" } ] }, { "text": "television", "type": "S", "inip": "69", "endp": "78", "level": "A1", "rule": "ReglaRevisionPalabras-1", "msg": "Posible error ortográfico.", "sug_list": [ { "form": "televisión", "confidence": "99" } ] } ], "statistics": { "words": "13", "non-repeated_words": "13", "characters_without_spaces": "68", "total_characters": "80", "sentences": "1", "paragraphs": "1" } }
6 Use the API
You can now use the best spelling and grammar checker for Spanish for free.