Hey all. I've created a Java library that offers a couple of different algorithms for generating random text (e.g. to generate character names or place names for an adventure game). It's pretty well documented, covered by tests, scanned for code quality, and available via Maven Central -- overkill for this kind of project, I know, but this is really a project I conceived of while training myself in the Java language (having worked for the past several years in Python and JS). I welcome feedback and contributions!
The library and docs: https://github.com/joeclark-phd/random-text-generators
A repo that uses the library to generate lots of example text: https://github.com/joeclark-phd/procedural-generation-examples
The main algorithm of interest is one that uses Markov chains to learn from a training dataset and produce new data with similar character sequences. Depending on the training data, this can do a good job of making original new text that sounds like it belongs in the original. For example, I trained it on a database of about 1300 ancient roman names and here are some examples of the random text output:
caelis domidus pilianus naso recunobaro
potiti cerius petrentius herenialio caelius
venatius octovergilio favenaeus surus wasyllvianus
nentius soceanus lucia eulo atric
caranoratus melus sily fulcherialio dula