Showing posts from January, 2016

Generating Sentences with Markov Chains and N-grams using IPython Notebook

Remember the chat bot assistants that plagued Web 1.0? At first glance, the sentences seemed reasonable, and we start to believe perhaps it's a human? But inevitably a non-sequitur such as thisis reached:Interviewer: You asked me where I was from already.
Eugene: So what that you were from already By the way, what’s your occupation? I mean – could you tell me about your work? Why does this happen? How are these sentences being generated? I've always wondered how chat bots like Alice or Eugenework. 

Now, they are obviously much more complex than this tutorial will delve into, but we can touch on some of the core principles. One of them is this idea of understanding the relationships between words in sentences. How can we get a machine to understand these relationships?
Before going further, this entire post is based on this nicer formatted IPython Notebook, feel free to read through that instead. It turns out there's the right way, and then there's the easy way. The right…