public class Markov
A Markov chain for characters. For each set of prefix strings, keeps track of possible next characters and the
probability of going to each.
- Lawrence Kesteloot, Paco Avila
|Constructor and Description
Creates a chain based on the Reader with a prefix of length "length".
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Markov(Reader in,
Creates a chain based on the Reader with a prefix of length "length". Reads the entire input stream and creates
the Markov chain.
public int get(String prefix,
Returns the next character to print given the prefix. Returns -1 when there are no possible next characters.
Copyright © 2016. All rights reserved.