Markov Chains are a model for simple statistical systems where the next state of the system is based only on the current state. Carter Turn Markov is a simple implementation of this in C++. It is designed to handle strings, but most data can be represented as a string (although it may be inefficient). Carter Turn Markov is available at Github.