Package uk.co.rafilevy.MarkovModels
-
Interface Summary Interface Description TextGenerativeModel An interface defining models used to generate strings -
Class Summary Class Description HiddenMarkovModel<H,E> A derivative of a MarkovModel where there is a hidden ordered sequence of states of type with fixed transition probabilities between states These hidden states each emit a value such that there is an observed ordered sequence of emitted values The class can be used to generate sequences probabilistically following the model or to decode an emitted sequence giving the most probable hidden sequence that generated itMarkovModel<A> A model representing an ordered sequence of states with a fixed probability of transitioning from a state to a consecutive state The class can be used to generate sequences probabilistically following the modelStringBigramModel An extension of a MarkovModel to be used specifically for text generation Very similar toStringMarkovModel
except works with transitions of sequences of consecutive string rather than single strings Will create sequences more closely related to original set but at higher risk of over-fittingStringMarkovModel An extension of a MarkovModel to be used specifically for text generation State sequences are supplied as strings rather than lists and can be decoded by using a regex to split the string into a sequence Sequences are then generated as normal and turned into strings by concatenating them with a " " in between Useful for generating texts in the style of other text corporaStringTrigramModel An extension of a MarkovModel to be used specifically for text generation Very similar toStringMarkovModel
except works with transitions of sequences of three strings rather than single strings Will create sequences more closely related to original set but at high risk of over-fitting without very large training set of string sequences