+ 2

Someone to translate a ruby code to python ?

I proposed a challenge. The goal was to make a word generator. Random letters, producing something readable, english-like. Gordie came with an amazing code, using Markov method. But this code is in ruby and I would really like to understand it. I only know python for now. So the question : could someone help me and translate Gordie's code to python ? Here is Gordie's code : https://code.sololearn.com/ct8qs1sPghCa/?ref=app Thanks to you all !

28th Sep 2017, 11:42 PM
Cépagrave
Cépagrave - avatar
2 ответов
+ 2
@Andrew G Very interesting ! Nice ! Thanks ! I don't get it all in details in javascript, but I understood the general behaviour. I think I can manage to produce my own similar code with python, just wait few days ... It's interesting that the difference with the "learning" markov code is : your code gives less english-like words, but most of them are very original, fun, and still pronounceable ... while markov method gives many existing words, specially when 3 or 4 letters, with an impressive feeling of english-like when it gives unknown words. Less exotic.
29th Sep 2017, 12:22 PM
Cépagrave
Cépagrave - avatar