Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mapmeld/node-rhyme
Extensions to a rhyming dictionary for node.js
https://github.com/mapmeld/node-rhyme
Last synced: 3 months ago
JSON representation
Extensions to a rhyming dictionary for node.js
- Host: GitHub
- URL: https://github.com/mapmeld/node-rhyme
- Owner: mapmeld
- Fork: true (kvnlnt/node-rhyme)
- Created: 2014-09-09T01:21:14.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-12T21:57:09.000Z (about 7 years ago)
- Last Synced: 2024-06-11T18:07:51.290Z (5 months ago)
- Language: JavaScript
- Homepage: npmjs.org/package/rhyme-plus
- Size: 15.6 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
rhyme-plus
=====A rhyming dictionary for your node.js.
example
=======var rhyme = require('rhyme-plus');
rhyme(function (r) {
console.log(r.rhyme('bed').join(' '));
});output:
$ node examples/bed.js
BLED BREAD BRED DEAD DREAD DRED DREDD ED FED FLED FREAD FRED FREDA GED HEAD
JED LEAD LED MED NED NEDD PLED READ READE RED REDD SAID SCHWED SFFED SHEAD
SHED SHEDD SHRED SLED SLEDD SPED SPREAD STEAD SWED SZWED TED THREAD TREAD
WED WEDD WEHDE ZEDexample2
=======var rhyme = require('rhyme-plus');
rhyme(function (r) {
console.log(JSON.stringify(r.findRhymes(['bed', 'read', 'feed'])));
});output:
$ node examples/bed.js
[['BED', 'READ'], ['READ', 'FEED']]methods
=======rhyme(callback)
---------Read in the rhyme database. Callback function gets called with the rhyme handle.
rhyme handle
============r.rhyme(word)
-------------Returns all rhymes for `word`.
r.pronounce(word)
-----------------Shows how to pronounce `word` using
[CMU's pronouncing dictionary phonemes
](http://www.speech.cs.cmu.edu/cgi-bin/cmudict).r.syllables(word)
-----------------Counts the syllables in `word` using the phonemes in `r.pronounce` and some
heuristics.r.alliteration(word)
-----------------Returns alliterative words, which begin with the same syllable as `word`.
r.doRhyme(word1, word2)
-----------------Returns whether these words could rhyme (for example: read and feed, read and fed).
r.findRhymes(words)
-----------------Searches the words array for pairs of rhyming words. Returns an array of pairs.
installation
============Using [npm](http://npmjs.org):
npm install rhyme-plus
testing
============Download rhyming dictionary using ```cd data && ./fetch.sh```