Page History
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Example 1.1 [GET]: Check request for American English text with all available check types (output in JSON)
Code Block | ||
---|---|---|
| ||
http(s)://svc.webspellchecker.net/spellcheck31/script/ssrv.fcgi?cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=json&customerid=[your-service-id] |
...
Command: check
Text: this sampl text demonstrates the work of the Web API service.
Language: en_US
Format: json
Request Responseresponse:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "result": [ { "matches": [ { "type": "spelling", "offset": 5, "length": 5, "suggestions": [ "sample", "sampled", "sampler", "samples", "ample", "amply", "scamp", "stamp" ] }, { "type": "grammar", "offset": 0, "length": 4, "rule": "UPPERCASE_SENTENCE_START", "message": "This sentence does not start with an uppercase letter", "suggestions": [ "This" ] } ] } ] } |
Example 1.2 [GET]: Check request for American English text with all available check types (output in XML)
Code Block | ||
---|---|---|
| ||
http(s)://svc.webspellchecker.net/spellcheck31/script/ssrv.fcgi?cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=xml&customerid=[your-service-id] |
...
- Command: check
- Text: this sampl text demonstrates the work of the Web API service.
- Language: en_US
- Format: xml
Request Responseresponse:
Code Block | ||||
---|---|---|---|---|
| ||||
<result> <result> <matches> <matches> <type>spelling</type> <offset>5</offset> <length>5</length> <suggestions> <suggestions>sample</suggestions> <suggestions>sampled</suggestions> <suggestions>sampler</suggestions> <suggestions>samples</suggestions> <suggestions>ample</suggestions> <suggestions>amply</suggestions> <suggestions>scamp</suggestions> <suggestions>stamp</suggestions> </suggestions> </matches> <type>grammar</type> <offset>0</offset> <length>4</length> <rule>UPPERCASE_SENTENCE_START</rule> <message>This sentence does not start with an uppercase letter</message> <suggestions> <suggestions>This</suggestions> </suggestions> </matches> </result> </result> |
Example 1.3 [GET]: Check request for American English text as two tokens with all available check types (output in JSON)
Code Block | ||
---|---|---|
| ||
https://svc.webspellchecker.net/spellcheck31/script/ssrv.fcgi?cmd=check&tokens=["this sampl text.", " It demonstrate the work of the Web API service."]&lang=en_US&customerid=[your-service-id] |
...
Command: check
Tokens: ["this sampl text.", " It demonstrate the work of the Web API service."]
Language: en_US
Format: json
Request Responseresponse:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "result": [ { "matches": [ { "type": "spelling", "offset": 5, "length": 5, "suggestions": [ "sample", "sampled", "sampler", "samples", "ample", "amply", "scamp", "stamp" ] }, { "type": "grammar", "offset": 0, "length": 4, "rule": "UPPERCASE_SENTENCE_START", "message": "This sentence does not start with an uppercase letter", "suggestions": [ "This" ] } ] }, { "matches": [ { "type": "grammar", "offset": 4, "length": 11, "rule": "IT_VBZ", "message": "Did you mean demonstrates?", "suggestions": [ "demonstrates" ] } ] } ] } |
Example 1.4 [GET]: Check request for American English text as two tokens with all available check types and shorntened response (output in JSON)
Code Block | ||
---|---|---|
| ||
https://svc.webspellchecker.net/spellcheck31/script/ssrv.fcgi?cmd=check&tokens=["this sampl text.", " It demonstrate the work of the Web API service."]&lang=en_US&short_answer=true&customerid=[your-service-id] |
...
Command: check
Tokens: ["this sampl text.", " It demonstrate the work of the Web API service."]
Language: en_US
Format: json
- Short Answer: true
Request Responseresponse:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "r": [ { "m": [ { "t": "spelling", "o": 5, "l": 5, "s": [ "sample", "sampled", "sampler", "samples", "ample", "amply", "scamp", "stamp" ] }, { "t": "grammar", "o": 0, "l": 4, "r": "UPPERCASE_SENTENCE_START", "m": "This sentence does not start with an uppercase letter", "s": [ "This" ] } ] }, { "m": [ { "t": "grammar", "o": 4, "l": 11, "r": "IT_VBZ", "m": "Did you mean demonstrates?", "s": [ "demonstrates" ] } ] } ] } |
Example 1.4 [POST]: Check request for American English text with all available check types (output in JSON)
Here we use the same request and parameters as described in example 1.1 but form it as a POST request.
...
Code Block | ||
---|---|---|
| ||
cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=json&customerid=[your-service-id] |
Request Responseresponse:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "result": [ { "matches": [ { "type": "spelling", "offset": 5, "length": 5, "suggestions": [ "sample", "sampled", "sampler", "samples", "ample", "amply", "scamp", "stamp" ] }, { "type": "grammar", "offset": 0, "length": 4, "rule": "UPPERCASE_SENTENCE_START", "message": "This sentence does not start with an uppercase letter", "suggestions": [ "This" ] } ] } ] } |
...