Command name: check_spelling
Here is a list of all possible parameters and values that can be used with the check_spelling command.
# | Parameter | Possible Values | Default Value | Description |
---|---|---|---|---|
1 | format |
| json | The response format for output data. |
2 | callback |
| A callback function name that will be used to manipulate with the JSON data received from the server. Such approach enables sharing of data bypassing same-origin policy. It can be used only along with “format=json”. | |
3 | out_type |
| words | A type of data output specifying the way to return misspelled words positions in the provided text or exact words. |
4 | ignore_all_caps |
| 0 | Ignore capitalized words. |
5 | ignore_words_with_numbers |
| 0 | Ignore words containing numbers. |
6 | ignore_mixed_case |
| 0 | Ignore words written with mixed case letters. |
7 | ignore_domain_names |
| 0 | Ignore domain names, web addresses. |
8 | text |
| A piece of text which will be sent for check. The text has to be in the UTF-8 encoding. Any found tags in the text will be interpreted as a plan text as well. Avoid using # and & symbols in the text. | |
9 | slang |
| en_US | A short code of a language which will be used for spell checking. |
10 | user_dictionary |
| A user dictionary name which will be used during spell checking. | |
11 | user_wordlist |
| The list of additional comma-separated words which will be used for spell checking. | |
12 | custom_dictionary |
| ||
13 | version | 1.0 | 1.0 | The version of Web API. |
14 | customerid |
| A special service ID value (activation key) that has to be passed to a request query. It's obtained upon subscription to the Cloud services (paid or trial). Applicable only for the Cloud version. |
Example 2.1 [GET]: Check spelling request (Output in XML)
https://svc.webspellchecker.net/api?cmd=check_spelling&format=xml&text=This sampl text demonstrates the work of the WebSpellChecker Web API service.&out_type=words&slang=en_US&customerid=[your-service-id]
Parameters:
- Command: check_spelling
- Format: xml
- Text: This sampl text demonstrates the work of the WebSpellChecker Web API service.
- Output: words
- Language: en_US
Request response:
<?xml version="1.0" encoding="utf-8"?> <check_spelling> <misspelling> <word>sampl</word> <ud>false</ud> <suggestions> <suggestion>sample</suggestion> <suggestion>sampled</suggestion> <suggestion>sampler</suggestion> <suggestion>samples</suggestion> <suggestion>ample</suggestion> <suggestion>amply</suggestion> <suggestion>scamp</suggestion> <suggestion>stamp</suggestion> </suggestions> </misspelling> </check_spelling>
Example 2.2 [GET]: Check spelling request (Output in JSON)
https://svc.webspellchecker.net/api?cmd=check_spelling&format=json&text=This sampl text demonstrates the work of the WebSpellChecker Web API service.&out_type=words&slang=en_US&customerid=[your-service-id]
Parameters:
- Command: check_spelling
- Format: json
- Text: This sampl text demonstrates the work of the WebSpellChecker Web API service.
- Output: words
- Language: en_US
Request response:
[ { "word": "sampl", "ud": false, "suggestions": [ "sample", "sampled", "sampler", "samples", "ample", "amply", "scamp", "stamp" ] } ]
Example 2.3 [POST]: Check spelling request (Output in JSON)
Here we use the same request and parameters as described in example above but form it as a POST request.
https://svc.webspellchecker.net/api?
cmd=check_spelling&format=json&text=This sampl text demonstrates the work of the WebSpellChecker Web API service.&out_type=words&slang=en_US&customerid=[your-service-id]
Request response:
[ { "word": "sampl", "ud": false, "suggestions": [ "sample", "sampled", "sampler", "samples", "ample", "amply", "scamp", "stamp" ] } ]