Skip to content

A small script to find / haiku hiding in your text / your miles may vary.

License

Notifications You must be signed in to change notification settings

mildmojo/haiku-finder-five

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haiku-finder-five

A small script to find
haiku hiding in your text
your miles may vary.

Usage

  1. Clone this repo: git clone https://github.com/mildmojo/haiku-finder-five.git && cd haiku-finder-five
  2. Install dependencies: gem install scalpel sqlite3
  3. Grab a copy of the GNU Collaborative International Dictionary of English.
  4. Extract the CIDE.* files alongside the load_gcide.rb script in your copy of this repo: tar zxvf gcide-0.51.tar.gz "CIDE.*"
  5. Create the word/syllable lookup database: ruby load_gcide.rb
  6. Run the haiku finder across your text file or PDF:
$ ruby find_haiku.rb my_resume.pdf
PERFECT
In my spare time I
collect vintage bottle caps
from antique bottles.

Haiku marked "PERFECT" are single sentences that follow the 5/7/5 structure. The finder only processes whole sentences at this time. In the future, it may be expanded to combine multiple sentences to form haiku.

Other reported haiku are sentences truncated after the 5/7/5 pattern is satisfied.

Known Issues

The GCIDE database doesn't typically include plurals, conjugations, or noun suffixes. The script may retry failed lookups with naïve strategies for finding root words.

The GCIDE database doesn't always include accurate pronunciation guides, which this software uses to calculate syllable counts. It's a good idea to double-check detected haiku for proper syllable counts.

LICENSE

Beware of license
Affero GPL, man
relicense when cleaned

About

A small script to find / haiku hiding in your text / your miles may vary.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages