GithubHelp home page GithubHelp logo

yawgmoth / markov Goto Github PK

View Code? Open in Web Editor NEW

This project forked from barrucadu/markov

2.0 3.0 1.0 112 KB

Markov chain text generator, as used for KingJamesProgramming

License: Do What The F*ck You Want To Public License

Python 100.00%

markov's Introduction

README

The program presents a REPL, from which you can generate text in a number of different ways, a list of commands can be produced by typing help, and help for specific topics can be found by typing help topic.

Dependencies

  • python3
  • docopt

Getting Started

  1. Download the KingJamesProgramming corpus:

    wget http://misc.barrucadu.co.uk/pub/KingJamesProgramming.tar.xz
    tar xvf KingJamesProgramming.tar.xz
    
  2. Fire up the program

    python3 /path/to/repo
    
  3. Generate text

    train 3 --noparagraphs /path/to/KingJamesProgramming/*
    tokens 350
    

Warning: Termination

The paragraphs and sentences generators may not terminate. Because they generate blocks of text at a time, and a block only ends when a specific token (such as a paragraph break) occurs, if the generator gets stuck in a loop, the token may never come up.

One way to resolve this would be to have a loop detector, but I haven't got around to doing this yet.

markov's People

Contributors

barrucadu avatar yawgmoth avatar

Stargazers

 avatar Rodentata avatar

Watchers

James Cloos avatar  avatar Rodentata avatar

Forkers

andrewgross

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.