Git Product home page Git Product logo

haiku-finder-five's Introduction

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

haiku-finder-five's People

Contributors

mildmojo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.