https://github.com/kennethormandy/word-o-mat
JavaScript version of Nina Stössinger’s word-o-mat: generate words for type specimens, spacing, and more.
https://github.com/kennethormandy/word-o-mat
Last synced: 11 months ago
JSON representation
JavaScript version of Nina Stössinger’s word-o-mat: generate words for type specimens, spacing, and more.
- Host: GitHub
- URL: https://github.com/kennethormandy/word-o-mat
- Owner: kennethormandy
- License: mit
- Created: 2015-11-07T21:15:23.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T10:15:18.000Z (over 3 years ago)
- Last Synced: 2025-08-09T19:29:36.915Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 6.16 MB
- Stars: 23
- Watchers: 3
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
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 a library for Node.js based on [Nina Stössinger’s amazing RoboFont extension](https://github.com/ninastoessinger/word-o-mat).
## Getting started
To install word-o-mat, with a recent version of [Node.js installed](https://nodejs.org), run the following command in your terminal:
```sh
npm install --save word-o-mat
```
The module is now a dependency of your project. Next, `require` it and pass in your desired options:
```js
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:
```js
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](https://github.com/casasin))
- Czech
- Danish
- Dutch (Nina Stössinger)
- Finnish
- French ([La Police Type Foundry](https://github.com/LaPolice) and David Hodgetts)
- German (Nina Stössinger)
- Hungarian
- Icelandic
- Italian ([Roberto Arista](https://github.com/roberto-arista))
- Latin ([Tobias Frere-Jones](http://www.frerejones.com/))
- Norwegian ([Sindre Bremnes](https://monokrom.no/))
- 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](https://github.com/ninastoessinger/word-o-mat) 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
[The MIT License (MIT)](LICENSE.md)
Copyright © 2014–2015 [Nina Stössinger](http://ninastoessinger.com/)
Copyright © 2015–2017 [Kenneth Ormandy](http://kennethormandy.com/)