Parsed Scrabble word lists (CSW21 and NWL2018) with definitions
npm install @herbcaudill/scrabble-wordsParsed Scrabble word lists with definitions and metadata.
- CSW21 - Collins Scrabble Words (279,077 words, ~30MB)
- NWL2018 - North American Word List (192,111 words, ~16MB)
``bash`
npm install @herbcaudill/scrabble-words
`typescript
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"
// }]
// }
`
`typescript
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
}
``
Word lists are parsed from the scrabblewords repository.
MIT