Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Checks to see if a haiku is in the form 5, 7, 5

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 doc
Octocat-spinner-32 lib
Octocat-spinner-32 public
Octocat-spinner-32 script
Octocat-spinner-32 test
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 config.ru
README.md

Haiku Checker

The original idea came from the first Friday Night Hacks session as a crowd-sourced haiku website for hipster-themed haikus [insert whose idea it was]. While the project never got off the ground, I decided after the hack night to create the haiku checker as my first solo Ruby on Rails project. About three hours later, here it is!

This haiku checker uses the pronunciation dictionary from Carnegie Mellon University.

http://www.speech.cs.cmu.edu/cgi-bin/cmudict

Getting Started

The initial seed data is pulled from the CMU dictionary and put into the database. It may take a few minutes so be patient while it runs!

$ git clone https://github.com/danclien/haikuchecker.git
$ cd haikuchecker
$ bundle install
$ rake haikuchecker:seed
$ rails server

While it's loading the data, you can open a Ruby on Rails console and check the number of entries in the database. There was around 133,000 entries the last time I ran this.

$ rails console
> Word.count

Issues

If there's a word that's not found in the dictionary, it automatically returns as invalid.

TODO

  • Clean up and add additional comments to the code
  • Add unit tests to the syllable counting validator
Something went wrong with that request. Please try again.