Code Monkey home page Code Monkey logo

haikuna-matata's Introduction

Build Status


A Machine Learning Haiku Generator

A project developed by Holly Stotelmyer (@hollabaq86), Noah Guy (@NoahRGuy), Dennis Marchetti (@dmarchet) and Joan Petersohn (@jepetersohn)

My responsibilities

In order to complete this project, I had to teach myself Python over the course of a few days and learn to utilizes the tools provided through NLTK. My responsibilities included developing methods to ensure proper syllable count, to parse large batches of txt files into unigrams with (key->value) associations between word frequencies -> count of occurrence in the text. Additionally, I wrote methods to identify parts of speech, and collaborated on a method to weed out parts of speech that sounded grammatically incorrect at the end of haiku lines. I also collaborated on adding AJAX to the haiku and user-feedback form.

Description

Haikuna-Matata generates completely original, correctly formatted haiku based on user input. A user types a word into the console when running the program, and the program will return a 5/7/5 style haiku built around the user's input. Given no user input, the haiku generated will be centered around a randomly generated word or pair of words. Users are then asked to rate the coherence of each line of the haiku. If a line is up-voted, the frequency of those word pairings will increase in the database. If a line is down-voted, the frequency of those word pairings will decrease in the database. Over time, this will train the generator to create more coherent haiku.

image

image

Basic Haiku Requirements

All Haiku are defined by the following structure

  • Each haiku has 3 lines.
  • Each haiku follows the following syllable construction for each line
  • 5 syllables for the first line
  • 7 syllables for the second line
  • 5 syllables for the third line

Intermediate Haiku Requirements

All Haikus must

  • Be centered around a user provided word, or given no user input, centered around a randomly generated word
  • Have no line ending in a preposition

Advanced Haiku Requirements

Stretch Goals for the machine to learn

  • Haikus must make sense.
  • All haikus will follow proper grammatical structure.

Technologies Used

  • Python
  • Natural Language Toolkit
  • Travis CI
  • SQLAlchemy
  • PostgreSQL
  • jQuery/AJAX
  • Flask

haikuna-matata's People

Contributors

dmarchet avatar hollabaq86 avatar jepetersohn avatar noahrguy avatar

Watchers

 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.