|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcs132.markov.Util
public class Util
This class provides some utility methods to create or train a Markov text generator from a Reader.
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | |
|---|---|
static MarkovText |
generateText(java.io.Reader in,
int order)
Build a Markov Chain transition table of the specified order. |
static MarkovText |
generateTextFromCharacters(java.io.Reader in,
int order)
Build a Markov Chain transition table of the specified order. |
static void |
trainOnCharacters(MarkovText m,
java.io.Reader in)
Train a MarkovText on the words that occur in a file |
static void |
trainOnWords(MarkovText m,
java.io.Reader in)
Train a MarkovText on the words that occur in a file |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static MarkovText generateText(java.io.Reader in,
int order)
throws java.io.IOException
in - Reader that contains training textorder - Order of the Markov Chain transition table
java.lang.Exception
java.io.IOException
public static MarkovText generateTextFromCharacters(java.io.Reader in,
int order)
throws java.io.IOException
in - Readerorder - Order of the Markov Chain transition table
java.lang.Exception
java.io.IOException
public static void trainOnCharacters(MarkovText m,
java.io.Reader in)
throws java.io.IOException
m - MarkovText to trainin - Reader
java.io.IOException
public static void trainOnWords(MarkovText m,
java.io.Reader in)
throws java.io.IOException
m - MarkovText to trainin - Reader
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||