README
word-o-mat
Looking for words that contain q but not u? Or French words that use an a, a g? Generate a list of words, based on your specific requirements, for type specimens, type sketching, spacing, and more. This is an npm module based on Nina Stössinger’s amazing RoboFont extension.
Getting started
To install word-o-mat, with a recent version of Node.js installed, run the following command in your terminal:
npm install --save word-o-mat
The module is now a dependency of your project. Next, require
it and pass in your desired options:
var wordomat = require('word-o-mat')
var mat = wordomat({
wordCount: 5
})
console.log(mat.data)
// Returns something like…
// ['económicamente', 'számára', 'ascents', 'mataran', 'spalla']
From here, you can start to pass in your own options to get the exact kind of words or phrases you are looking for:
var wordomat = require('word-o-mat')
var mat = wordomat({
wordCount: 5, // Total number of words
minLength: 8, // Shortest permitted word length
maxLength: 30, // Longest permitted word length
requiredLetters: 'înc', // Words with “î,” “n,” and “c”
requiredLettersOnly: true, // …and must have all of them
lang: 'french', // Use the French word-o-mat list
case: 'upper', // Convert them to uppercase
sort: 'alphabetical' // And sort them alphabetically
})
console.log(mat.data)
// Returns something like…
// ['CONNAÎTRA', 'CONNAÎTRE', 'CONNAÎTREZ', 'CONTREMAÎTRE', 'DÉCHAÎNÉ']
Word Lists
This module includes the up-to-date word lists built into the original word-o-mat plugin, manually corrected by the following people where noted:
- Catalan (Joancarles Casasín)
- Czech
- Danish
- Dutch (Nina Stössinger)
- Finnish
- French (La Police Type Foundry and David Hodgetts)
- German (Nina Stössinger)
- Hungarian
- Icelandic
- Italian (Roberto Arista)
- Latin (Tobias Frere-Jones)
- Norwegian (Sindre Bremnes)
- Polish
- Slovak
- Spanish
- Vietnamese syllables
Word lists usually contain between 5,000 and 30,000 words each (only the Vietnamese one is much shorter) and are derived from various open/CC licensed sources; please check the individual files in the original repo for details.
If you’d like to update the word lists, please open a Pull Request against Nina’s repo, rather than this one. The included JSON files are build from those source files automatically.
License
Copyright © 2015 Kenneth Ormandy
Copyright © 2014–2015 Nina Stössinger