Skip to content

itsjustmustafa/syllableCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Syllable Counter and Haiku Checker

syllables.py

Given an input of an English word as a string, output the number of syllables it has.

>>> import syllables
>>> syllables.countSyllables("syllables")
3

haiku.py

Can check if a sentence follows a certain syllabic strucure, and more specifically can check if it follows that of a haiku

>>> import haiku
>>> haiku.checkHaiku("This is a haiku, do you like what i have made? It is pretty pog")
[True, ['This is a haiku, ', 'do you like what i have made? ', 'It is pretty pog']]
>>> haiku.checkSyllabicStructure("it is the day to go and smell nature", [2, 2, 2, 2, 2])
[True, ['it is ', 'the day ', 'to go ', 'and smell ', 'nature']]

Please feel free to make a pull request!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages