Page History
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
The check command is available since the release of WebSpellChecker 5.5.4x in October 2019. It combines all available check types (spelling and grammar) of text in a single command.
Info |
---|
Command name: check |
Here is a list of all possible parameters and values that can be used with the check command.
Note |
---|
The list of parameters can be used and available only when spelling check is enabled. These parameters are marked with yellow color. |
...
- json
- xml
...
- callback function name
...
- plain text
...
- Array of strings, e.g. ["This is a sentence number 1.", "This is a sentence number 2."]
The parameter defines a text separated in tokens that will be sent for check. The text should be presented as an array of strings. Right now each string is a token which equals one sentence.
Note |
---|
You can use either tokens or text at a time in a request. However, using text is more common. |
...
- true
- false
...
- true
- false
...
- user dictionary name (e.g. testdict)
...
The parameter specifies a user dictionary name which will be used during check spelling.
...
- additional wordlist
...
The parameter provides the list of additional comma-separated words which will be used for spell checking.
...
- custom dictionary IDs (e.g. 100694)
The parameter specifies global custom dictionary IDs which can be used during check spelling.
Info |
---|
Each new Dictionary on the creation obtains its unique Dictionary ID. You can find information about your custom dictionaries by logging in to your account panel on webspellchecker.com website (Login –> Dictionaries –> List of Custom Dictionaries). |
...
- 0 – Do not ignore all words written in capital letters (e.g. UPPERCASE).
- 1 – Ignore all words written in capital letters.
...
The parameter regulates whether to ignore capitalized words or not.
...
- 0 – Do not ignore words that contain numbers (e.g. Number1).
- 1 – Ignore words that contain numbers.
...
The parameter regulates whether to ignore words containing numbers or not.
...
- 0 – Do not ignore words with mixed case letters (e.g. MixedCase).
- 1 – Ignore words with mixed case letters.
...
The parameter regulates whether to ignore words written with mixed case letters or not.
...
- 0 – Do not ignore web addresses that start with either “www”, “http:” or “https:” and end with a domain name.
- 1 – Ignore web addresses and domain names.
...
The parameter regulates whether to ignore domain names, web addresses or not.
...
- minimal number of letters in a word to be checked
...
The parameter specifies the minimal number of letters in the word which will be checked for spelling. E.g. if 3 is specified, the words with 2 letters and less will be ignored.
...
- string of chars (e.g. “-“)
...
The parameter defines a list of characters that should be considered as delimiters during spelling check.
...
- true
- false
...
The parameter is responsible for shortening every static string JSON key name, like messages or type, down to its first character, like:
- m - matches, message
- o - offset
- l - length
- t - type
- r - rule
- s - suggestions
...
- encrypted_customer_ID value
This parameter specifies a special customer ID value that has to be passed to a request query.
A customer ID can be obtained upon subscription to the Cloud services (paid or trial).
Warning |
---|
Without a valid customer ID, any request to Web API Cloud will fail. |
Response Structure
The result is an array of objects which contains matches, where matches is also an array of objects consisting of attribute-value pairs.
The table below represents the following attribute-value pairs:
...
- spelling
- grammar
...
- true
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"result": [
{
"matches": [
{
"type": "spelling",
"offset": X1,
"length": Y1,
"ud": true,
"suggestions": ["..."]
}
]
}
]
} |
...
language | js |
---|---|
theme | Emacs |
title | Type: Grammar |
...
Example 1.1 [GET]: Check request for American English text with all available check types (output in JSON)
...