DEMO
See the live demo on github pages:
https://wordsuite.github.io/wordsuite/demo/demo.html
HOW TO USE
Installation
- Add the script tag to your site
<script src="https://wordsuite.github.io/wordsuite/client.bundle.js"></script>
- Create instance Create a new Spell instance
var spell = window.Spell('https://wordsuite.github.io/wordsuite/')
Usage
- Is word in dictionary?
spell.spell(input.value).then(console.log)
// {
// "job": "spell",
// "value": "testing",
// "result": true
// }
- Suggest corrections for unknown word
spell.suggest(input.value).then(console.log)
// {
// "job": "suggest",
// "value": "testingx",
// "result": [
// "testing",
// "testings",
// "besting",
// "jesting",
// "nesting"
// ]
// }
- Get definition of word
spell.define(input.value).then(console.log)
// {
// "job": "define",
// "value": "testing",
// "result": {
// "word": "testing",
// "wordset_id": "a94dcf4488",
// "meanings": [
// {
// "id": "d0feff1953",
// "def": "the act of giving students or candidates a test (as by questions) to determine what they know or have learned",
// "speech_part": "noun",
// "synonyms": [
// "examination"
// ]
// },
// ...
// ]
// }
// }
- Look up synonyms (alternative words)
spell.alternative(input.value).then(console.log)
// {
// "job": "alternative",
// "value": "testing",
// "result": [
// "testing",
// "R and D",
// "analytic",
// "control",
// "control experiment",
// "controlled experiment",
// "cut and try",
// "cut-and-try",
// "empirical",
// ...
// ]
// }