http(s)://svc.webspellchecker.net/api?cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=json&customerid=[your-service-id] |
Parameters:
Command: check
Text: this sampl text demonstrates the work of the Web API service.
Language: en_US
Format: json
Request response:
{ "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" ] } ] } ] } |
http(s)://svc.webspellchecker.net/api?cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=xml&customerid=[your-service-id] |
Parameters:
Request response:
<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> |
https://svc.webspellchecker.net/api?cmd=check&tokens=["this sampl text.", " It demonstrate the work of the Web API service."]&lang=en_US&customerid=[your-service-id] |
Parameters:
Command: check
Tokens: ["this sampl text.", " It demonstrate the work of the Web API service."]
Language: en_US
Format: json
Request response:
{ "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" ] } ] } ] } |
https://svc.webspellchecker.net/api?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] |
Parameters:
Command: check
Tokens: ["this sampl text.", " It demonstrate the work of the Web API service."]
Language: en_US
Format: json
Request response:
{ "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" ] } ] } ] } |
Here we use the same request and parameters as described in example 1.1 but form it as a POST request.
https://svc.webspellchecker.net/api? |
cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=en_US&format=json&customerid=[your-service-id] |
Request response:
{ "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" ] } ] } ] } |
In this POST type request, we use “auto” as a value for language and define the priorities for the language dialects. If “en” is detected, then AI-based English will be used during check request.
https://svc.webspellchecker.net/api? |
cmd=check&text=this sampl text demonstrates the work of the Web API service.&lang=auto&format=json&customerid=[your-service-id]&auto_lang_priorities={"en":"en_AI"} |