Generate Bird Names Using a Markov Chain

SequencePredict trains a model to capture the underlying statistics of a sequence. This example uses a collection of bird names as training data to generate new realistic bird names using a Markov model.

Load a list of birds using Entity.

Retrieve the corresponding bird names.

Filter out the Latin bird names (starting with a uppercase letter) from the common ones and format strings.

There are 1617 different names.

Train a Markov language model on the character sequences; mark the beginning and end of names with special characters ">" and "<".

Generate a new name from the trained language model, sampling 20 characters from the "name begins" marker ">" and taking characters up to the "name ends" marker "<".

Related Examples

de es fr ja ko pt-br zh