• This repository has been archived on 09/Jan/2018
  • Stars
    star
    452
  • Rank 96,761 (Top 2 %)
  • Language
    Python
  • License
    Do What The F*ck ...
  • Created almost 11 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Markov chain text generator, as used for KingJamesProgramming

README

Overview

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.

Getting Started

  1. Download the KingJamesProgramming corpus from this repo

    tar xvf KingJamesProgramming.tar.xz
    
  2. Set up the virtualenv

    virtualenv venv
    source venv/bin/activate
    pip install -r requirements.txt
    
  3. Fire up the program

    python3 -m markov
    
  4. Generate text

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

Warning: Repetition

To avoid infinite loops, the paragraphs and sentences generators may end abruptly. Because they generate blocks of text at a time, and a block would only end when a specific token (such as a paragraph break) occurs, the generators are programmed to end the chunk immediately if they find themselves generating a token from the same state repeatedly (with the threshold set at the number of occurences of that state in the training corpus). This can cause issues with small training sets or, if the training set has many rare words, with a high chance of choosing a random token.

More Repositories

1

dejafu

Systematic concurrency testing meets Haskell.
Haskell
188
star
2

nixfiles

My NixOS configuration and assorted other crap.
Nix
135
star
3

hledger-scripts

Helpful scripts to do things with your hledger data.
Haskell
54
star
4

lainonlife

RIP lainchan radio, taken out by HDD failure.
Python
53
star
5

logdb

An efficient log-structured database supporting efficient insertion of new entries and removal from either end of the log.
Go
28
star
6

finances

A small tool to visualise my hledger journal. Your mileage may vary.
JavaScript
27
star
7

bookdb

Python
25
star
8

dotfiles

My dotfiles and assorted other crap, managed with chezmoi.
Python
25
star
9

resolved

A simple DNS server for home networks.
Rust
20
star
10

irc-client

This project is essentially abandonware!
Haskell
20
star
11

cv

My CV
TeX
19
star
12

minifu

A tutorial on writing a concurrency testing tool in Haskell
Haskell
13
star
13

bible

The King James Bible, typeset with LaTeX
TeX
12
star
14

irc-conduit

This project is essentially abandonware!
Haskell
11
star
15

yukibot

An IRC bot, and associated libraries, for the ##compsoc-uk-anime channel on Freenode
Haskell
10
star
16

meng-project

MEng project on verified garbage collection
TeX
8
star
17

quickie

A quick brainfuck compiler / JITed interpreter.
Haskell
6
star
18

bookmarks

A little search engine to manage my bookmarks
Python
5
star
19

memo.barrucadu.co.uk

My memos
Haskell
5
star
20

irc-ctcp

This project is essentially abandonware!
Haskell
4
star
21

coco

The Concurrency Commentator; giving you cheap remarks about concurrent programs.
Haskell
4
star
22

cabal-info

Read information from cabal files.
Haskell
4
star
23

search-party

A library for parallel, non-deterministic, search.
Haskell
4
star
24

pusher-ws

Implementation of the Pusher WebSocket protocol in Haskell
Haskell
3
star
25

aoc

Advent of Code
Haskell
3
star
26

bfo

Optimising brainfuck interpreter.
Rust
3
star
27

quantified-self-scripts

Grabbing data about me and pushing it into a dashboard
Python
3
star
28

barrucadu.co.uk

My personal website
HTML
2
star
29

prometheus-speedtest-exporter

Python
2
star
30

prometheus-awair-exporter

Go
2
star
31

barrucadu.dev

2
star
32

both

This project is essentially abandonware!
Haskell
2
star
33

phd

I have no idea what I'm doing
TeX
2
star
34

monad-monitor

Haskell
2
star
35

alphagov-backend.hs

Drop-in replacements for GOV.UK backend services, written in Haskell using servant.
Haskell
1
star
36

rogue-mayor

A town management game I'll probably never finish.
Rust
1
star
37

lambdamoo

C
1
star
38

king-james-programming

Markov chain text generator, as used for KingJamesProgramming (post-2024)
Shell
1
star
39

sat

Rust
1
star
40

packdeps-github

Open issues on GitHub about outdated dependencies automatically
Haskell
1
star
41

govuk-rota-generators

Generates rotas for GOV.UK teams.
Python
1
star
42

sed-as-a-service

An innovative solution to turn CPU-bound sed invocations into IO-bound network requests
Java
1
star