Giter VIP home page Giter VIP logo

markovscope's Introduction

Markov Horoscopes

An attempt to generate convincingly fake horoscopes (aka horoscopes) using Markov Chains and a bunch of data from the NY Post. Data is about 3 years of horoscopes for each sign and can be found in the csv file.

A bit about how these are generated: each "state" in the chain consists of two words. Longer sequences lead to better sounding results but you also risk just reprinting what was in the data. The distributions of words that follow are built on a per sign basis, as I think there are certain planets and things associated with each sign. The next word at each step is chosen uniformly, but duplicates are allowed in the lists of available words, which weights words appropriately according to how they are distributed in the data.

If you want to generate a horoscope, make sure you have the states in your data folder and markovscope.py and run: python markovscope.py <sign>

Results are generally pretty nonsensical, but some of the generated text does have a horoscope tone to it. Here's an example that was actually the first one generated.

python markovscope.py taurus What happens over the next seven days is a very small risk. Before you proceed, ask yourself if you have noticed the difference. Friends and family will never happen. Remember too that quality is more to life in remarkable ways, so stop dithering and start thinking that you see it.

RNN

Since Markov Chains didn't fly so good I figured training an RNN on the same dataset might produce something interesting.

I preprocessed the data by creating sequences out of each horoscope and inserting sentence start and end tags. Then each word gets mapped to an integer and divided by the total number of words to produce sequences of small valued inputs to feed into the network. Currently it'll produce a decent sentence or two but then just repeat itself.

markovscope's People

Contributors

dsnam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.