Elm-markov: Markov Chain Model and Generator

I recently just published my first package elm-markov! Markov models are models which represent transition probabilities of a string of objects or events. I mostly made it out of curiosity of learning how they work, but I also noticed that there was no package like this yet so I figured I could put my first notch in my belt! The example I have in my repository is for generating random words and names, stylized from whatever corpus you made. There are plenty of random (cartoon/joke/name) generators out on the internet using this type of model.

I was also able to make it data agnostic so that you can use any data type to learn from and generate new content from. It even has serialization and dserialization so that it can store and load trained models to/from the server so that you only need to do the training once!

In the grand scheme of things this isn’t ground breaking but I’m happy to finally start contributing to the elm community. I’d love some feedback on API design for a library like this. From many of the amazing libraries that Elm has, I’ve been trying to see what the best practices are for creating and maintaining packages. If nothing else, I’m just excited to have my first published package be in Elm!


Seeing math(s) libraries in elm is always exititing, nice work!

1 Like

Looks very nice! I remember Markov chains being my first published library in the Clojure ecosystem :sweat_smile: So this fills me with nostalgia.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.