@herbcaudill/scrabble-words
v1.0.2
Published
Parsed Scrabble word lists (CSW21 and NWL2018) with definitions
Maintainers
Readme
@herbcaudill/scrabble-words
Parsed Scrabble word lists with definitions and metadata.
Dictionaries
- CSW21 - Collins Scrabble Words (279,077 words, ~30MB)
- NWL2018 - North American Word List (192,111 words, ~16MB)
Installation
npm install @herbcaudill/scrabble-wordsUsage
import csw from "@herbcaudill/scrabble-words/csw21"
import nwl from "@herbcaudill/scrabble-words/nwl2018"
// Find a word
const word = csw.find(w => w.word === "QUIXOTIC")
console.log(word)
// {
// word: "QUIXOTIC",
// definitions: [{
// text: "extravagantly chivalrous",
// partOfSpeech: "adj"
// }]
// }Types
type Word = {
word: string
definitions: Definition[]
crossRef?: CrossRef
}
type Definition = {
text: string
partOfSpeech: string
forms?: string[] // e.g. ["CATS"] or ["JUMPED", "JUMPING", "JUMPS"]
alsoSpelled?: string[] // alternative spellings
note?: string // e.g. "Hawaiian", "obsolete"
}
type CrossRef = {
word: string // base word this is a form of
partOfSpeech: string
}Data source
Word lists are parsed from the scrabblewords repository.
License
MIT
