Skip to content

all things wordy. check spellings, suggest corrections, dictionary and thesaurus in one with no backend server needed

Notifications You must be signed in to change notification settings

wordsuite/wordsuite

Repository files navigation

DEMO

See the live demo on github pages:

https://wordsuite.github.io/wordsuite/demo/demo.html

HOW TO USE

Installation

  1. Add the script tag to your site
<script src="https://wordsuite.github.io/wordsuite/client.bundle.js"></script>
  1. Create instance Create a new Spell instance
var spell = window.Spell('https://wordsuite.github.io/wordsuite/')

Usage

  1. Is word in dictionary?
spell.spell(input.value).then(console.log)

// {
//  "job": "spell",
//  "value": "testing",
//  "result": true
// }
  1. Suggest corrections for unknown word
spell.suggest(input.value).then(console.log)

// {
//   "job": "suggest",
//   "value": "testingx",
//   "result": [
//     "testing",
//     "testings",
//     "besting",
//     "jesting",
//     "nesting"
//   ]
// }
  1. 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"
//         ]
//       },
//       ...
//     ]
//   }
// }
  1. 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",
//     ...
//   ]
// }

About

all things wordy. check spellings, suggest corrections, dictionary and thesaurus in one with no backend server needed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published