Coswold / tweet_generator

A sentence generator built using a Markov chain

Home Page:https://philosopher-gen.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tweet Generator

Deployment

This project was used to explore data sctructures, specifically dictionaries and hashtables, as well as working on algorithm analysis. After analyzing a large corpus of text, I was able to create a dictionary of dictionaries containing histograms of word frequencies. By randomly sampling words based on frequency, we can create sentences sounding similar to what the original text might sound like, but are actually completely generated. Check out Markov Chains for more information on the algorithm used.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Install all requirements

pip install -r requirements.txt

Create .txt file for the corpus you would like to analyze

vim buddha.txt

Installing

A step by step series of examples that tell you how to get a development env running

Activate virtual environment

source venv/bin/activate

Run locally

python3 app.py

Built With

  • Flask - The web framework used
  • Pip - Dependency Management

Authors

  • Connor Oswold - Initial work - Coswold

About

A sentence generator built using a Markov chain

https://philosopher-gen.herokuapp.com/


Languages

Language:Python 99.1%Language:C 0.3%Language:CSS 0.2%Language:JavaScript 0.2%Language:Shell 0.1%Language:HTML 0.1%