WebSpellChecker.net Wiki

Home

Web API


The WebSpellChecker.net Web API provides suggestions for spelling and grammar corrections for specified text.

Request url

http://[your_host]/spellcheck/script/ssrv.cgi?cmd=command&parameter=value&customerid=LCID

Web API commands

ParameterCommands
cmdcheck_spelling, user dictionary, grammar_check, api_version

?cmd=check_spelling

Parameter Possible valuesdescription
format json, xml Response format: JSON or XML (default)
callback any JSON callback function: format=json
out_type positions, wordswords - returns misspelled, words and suggestions, positions - returns position in text of misspellings and suggestions (default - words)
ignore_all_caps 0, 1If set to 1 forces to ignore all-caps words (default 0)
ignore_words_with_numbers 0, 1 If set to 1 forces to ignore words with numbers (default 0)
ignore_mixed_case 0, 1 If set to 1 forces to ignore mixed case words(default 0)
ignore_domain_names 0, 1 If set to 1 forces to ignore domain name(default 0)
text any (UTF-8) plain text to be spell checked. If any tags found in text will be interpreted as a plain text as well
slangen_US en_GB pt_BR, da_DK, nl_NL, en_CA, fi_FI, fr_FR, fr_CA, de_DE, el_GR, it_IT, nb_NO, pt_PT, es_ES, sv_SE Language: en_US (default)
user_dictionary any The name of user dictionary to be used in spell checking
custom_dictionary any The name of user dictionary to be used in spell checking
user_wordlist any The coma-separated list of additional dictionary words to be used in spell checking
version 1.0 Web API version
customerid The Licensed customers should use the following 'customerid' parameter value:'1:wiN6M-YQYOz2-PTPoa2-3yaA92-PmWom-3CEx53-jHqwR3-NYK6b-XR5Uh1-M7YAp4'. Long Customer ID (LCID)

?cmd=grammar_check

Parameter Possible valuesdescription
format json, xml Response format: JSON or XML (default)
callback any JSON callback function: format=json
text any (UTF-8) plain text to be spell checked. If any tags found in text will be interpreted as a plain text as well
slangen_US en_GB Language: en_US (default)
version 1.0 Web API version
customerid The Licensed customers should use the following 'customerid' parameter value:'1:wiN6M-YQYOz2-PTPoa2-3yaA92-PmWom-3CEx53-jHqwR3-NYK6b-XR5Uh1-M7YAp4'. Long Customer ID (LCID)

?cmd=user_dictionary

Parameter Possible valuesdescription
format json, xml Response format: JSON or XML (default)
callback any JSON callback function: format=json
action create, rename, delete, addword, deleteword, editword, check, getdict create, rename, delete - performs appropriate action with user dictionary, addword action adds a word to user dictionary, deleteword action removes a word form user dictionary, editword action allows to replace a misspelled word with correct one, check - checks if user dictionary exists on the server,
getdict - returns the content of user dictionary (works with JSON format only)
customerid The Licensed customers should use the following 'customerid' parameter value:'1:wiN6M-YQYOz2-PTPoa2-3yaA92-PmWom-3CEx53-jHqwR3-NYK6b-XR5Uh1-M7YAp4'. Long Customer ID (LCID)
&action=create
Parameter Possible valuesdescription
name any The name of user dictionary
wordlist any coma-separated values to be added to created dictionary
&action=delete
Parameter Possible valuesdescription
name any The name of user dictionary
&action=rename
Parameter Possible valuesdescription
name any The name of user dictionary
new_name any The new name of user dictionary
&action=check
Parameter Possible valuesdescription
name any The name of user dictionary
&action=addword
Parameter Possible valuesdescription
name any The name of user dictionary
word any The word to be added
&action=deleteword
Parameter Possible valuesdescription
name any The name of user dictionary
word any The word to be removed
&action=editword
Parameter Possible valuesdescription
name any The name of user dictionary
word any Misspelled word that will be replaced
new_word any Correct word to replace the misspelled one

Usage Examples

Spell Check Request

http://[your_host]/spellcheck/script/ssrv.cgi?cmd=check_spelling&customerid=1:wiN6M-YQYOz2-PTPoa2-3yaA92-PmWom-3CEx53-jHqwR3-NYK6b-XR5Uh1-M7YAp4&version=1.0&out_type=words&slang=en_US&callback=cc&format=xml&text=These+are+an+examples+of+a+sentences+with+two+misspelled+words+and+gramar+problems

Spell Check Response

<?xml version="1.0" encoding="utf-8"?>
<spellcheck>
<misspelling>
<word>texttt</word>
<suggestions>
<suggestion>text</suggestion>
<suggestion>texts</suggestion>
<suggestion>Tex</suggestion>
<suggestion>extent</suggestion>
<suggestion>exit</suggestion>
<suggestion>extant</suggestion>
<suggestion>extort</suggestion>
<suggestion>sextet</suggestion>
<suggestion>stet</suggestion>
<suggestion>extents</suggestion>
<suggestion>stetted</suggestion>
<suggestion>test</suggestion>
<suggestion>extorts</suggestion>
<suggestion>tatty</suggestion>
<suggestion>testate</suggestion>
</suggestions>
</misspelling>
</spellcheck>

Grammar Check Request

http://[your_host]/spellcheck/script/ssrv.cgi?cmd=grammar_check&customerid=1:wiN6M-YQYOz2-PTPoa2-3yaA92-PmWom-3CEx53-jHqwR3-NYK6b-XR5Uh1-M7YAp4&version=1.0&out_type=words&slang=en_US&callback=cc&format=xml&text=These+are+an+examples+of+a+sentences+with+two+misspelled+words+and+gramar+problems

Grammar Check Response

<?xml version="1.0" encoding="utf-8"?>
<grammar_check>
<grammar_problem>
<phrase>an examples of</phrase>
<description>
Plural noun "examples" conflicts with modifier "an."
</description>
<suggestions>
<suggestion>an example of</suggestion>
<suggestion>examples of</suggestion>
</suggestions>
</grammar_problem>
</grammar_check>