Git Product home page Git Product logo

tweet-generator's Introduction

Tweet Generator: TVD

Home Character

About

Tweet Generator was an extremely fun project to work on. This project implements a basic form of Natural Language Processing utilizing Markov Chains. Markov Chains are structured similarly to a finite state machine model.

Tweet Generation Methodology

The way the Tweet Generator works is divided into steps:

  1. Initally, the program will take in a given text file and build a Markov chain using a Dictogram Structure which is simply a Python's dictonary class extended to have additional functionality.

  2. The chain is built by specifiying an order. The order indicates the amount of words in a given state.

For Instance take the sentence

one fish two fish red fish blue fish

A second order chain would dictate that each state would be two words one fish fish two two fish etc.. each state contains all words that follow that exact sequence of characters. The higher the order the more consecutive words appear in a single state. Too high of an order will only generate sentences that already exisit in the sample text.

  1. As the chain is built start and stop states are generated. Start states consists of the begining of sentencres and stop states consists of ending punctuation like . ? !.

  2. Now the fun begins! This is the point where the chain is fully built and the sentence starts to generate. Markov chains use a form of stoicastic sampling which just simply means words are chosen based on probability.

Author

  • Audaris 'Audi' Blades

Getting Started

Simply click here to go to the tweet generator's website. The server may take a minute or two to load up as it switches from a dormant to active state.

Author

  • Audaris 'Audi' Blades

Technologies Used

  • Python - Programming Language
  • Flask - Lightweight web application framework
  • Jinja - Template engine for python
  • Bootstrap - Front end framework
  • Heroku - Application deployment site

Acknowledgments

  • Make School's CS 1.2 course provided the fondation for this assignment.

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.