The Syllable Sorter for the Modern Age. ( without haiku generation. )
sylb
sorts your words by syllable, and lets you work your magic.
sylb
also powers this Twitter bot.
npm install --save sylb
Then, in your code:
var sylb = require('sylb')
Now you're good to go.
- Sorts a lot of words into their respective arrays.
- Sorts a single word into its respective array.
- Returns the syllable count of a string.
- Shows you the words in each syllable array.
- Shows you how many words you have in each syllable array.
If you'd like access to these, please install sylb-haiku instead.
- Generates a potentially incomplete haiku using words from your database. Used for testing.
- Generates a complete haiku using words from your database, no matter what.
##Variable Exports
var sylb = require('sylb');
console.log(sylb.I) // one syllable array
console.log(sylb.II) // two syllable array
console.log(sylb.III) // three syllable array
console.log(sylb.IV) // four syllable array
console.log(sylb.V) // five syllable array
console.log(sylb.VI) // six syllable array
console.log(sylb.VII) // seven syllable array
console.log(sylb.VIII) // eight syllable array
console.log(sylb.IX) // nine syllable array
console.log(sylb.X) // ten syllable array
console.log(sylb.XI) // eleven syllable array
console.log(sylb.unsortable) // things sylb couldn't sort. things with no vowels go in here.
console.log(sylb.sylbArrays) // all of the above
const sylb = require('sylb')
const fs = require('fs')
var corpus = fs.readFileSync('words.txt', 'utf8')
corpus = corpus.split(' ')
sylb.massSort(corpus)
sylb.printDBCount()
Did you know? In old Sylb Packages, around 200 lines were dedicated to haiku generation.