Skip to content

Instantly share code, notes, and snippets.

View ronrest's full-sized avatar

Ronny Restrepo ronrest

View GitHub Profile
@ronrest
ronrest / ngram.py
Last active August 29, 2015 14:16 — forked from pebreo/ngram.py
Pseudo Sentence Generator using Markov Chains
""" =============================================================================
This python script is for generating sentences that resemble the style of some
particular author. Does so by making use of Markov chains.
============================================================================= """
from collections import Counter
from random import choice
import re