Follow

Playing with Markov chains;
sentences generated from journal entries :)

@joshavanier
haha I love markov-chain-based texts. the algorithm is simple and the results are usually amazing.
do you mind telling us more or less how do you build the chain?

@joshavanier
(I did one a while ago with some texts of Roberto Arlt here say-something-arlt.herokuapp.c but I remember I struggled a bit to not make it enter in endless loops, and to control the amount of possible variations (I remember that I used a config parameter that makes it aware of the n previous words, but having it higher than 2 was just extracting literal phrases from the book most of the time :( )

@joshavanier
I parsed the first 3 chapters from "Los siete locos" from here: biblioteca.derechoaleer.org/bi

I have the chain dumped to a file, I can take some numbers out if you are interested

@joshavanier Ok, I took a look. The structure is very similar to what you have, pair of words associated to possible next words.
It has 47905 pairs.

40442 of those pairs have a single option as next word (I guess that's why it generates almost always textual extracts)

There's one entry that has 4127 possibilities. When I took a look, I found out it was a triple space 🤷‍♂️

looks like if I do a more intelligent parsing and some cleanup of the model it might return more interesting results :)

@joshavanier I can upload the code somewhere if you are interested (CW: is quite hacky and zero-polished :P)

@f3r That's a lot of pairs. Sounds like there's more to your implementation than what I have; I'd love to look at it

It's nothing fancy 

Sign in to participate in the conversation
Merveilles

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them. Check out our Patreon to see our donations.