Kadhim Shubber Markov Text Generator

Well, it’s Christmas so I’m taking on stupid self invented programming projects, much like last year with Selenabot. This year I’ve decided I’m going to create a Markov Text generator that recreates the work of a Young Kadhim Shubber (YKS).

I’ve decided to scrape all Kadhim’s work on Felix that’s available in non-PDF form (for now… if this becomes very easy perhaps I’ll try and automate PDF reading so we can even get his frozen hot-takes on world politics from 2008).

First order of the day is making a markov text parser and generator that work in python3. I forked an old python2 code I found on github into Markov_text3, which is a python3 module for generating Markov chains of text from a given source (saved as a .txt file).

Now we have Markov_text3, I need to get the source material. Having a quick look at Kadhim’s page on Felix (http://felixonline.co.uk/authors/ks607/) he has around 140 articles online, although not all of them published under his name are written by him (he used to be editor and thus I guess uploaded other people’s stuff). It appears to be material from pages 6 & 7 (his later work) so I’ll scrape that material manually.

Mid-Jan Update: I got busy over the xmas holidays and this project fell by the wayside, the main problem was that I have completely forgotten how to use Beautiful Soup properly and thus couldn’t easily get a list of all the articles that Kadhim had written. This was stupid because I managed to get a Markov Generating script going quite nicely.


Leave a Reply

Your email address will not be published. Required fields are marked *