playing with nltk to make a chatbot
I had an old bit, from a project in class called 'rabbithole' that I used to have the computer return a made up sentence for a user in the game when they entered data that did not fit any of my if/elif clauses. It was a bit of a mashup text based game.... Anyhoo, I decided I wanted to explore A.I. and someone I know suggested looking at 'ELIZA': # someone made a javascript web version of her! http://www.masswerk.at/elizabot/ I think the name at the bottom of that link is the author/writer, N. Landsteiner wickipedia: https://en.wikipedia.org/wiki/ELIZA my little mess around with masswerk link: Anyhoo, here's a bit of code where I'm trying to figure out how to use this nltk, and wordnet to process my nouns and verbs so I can return sentences to the user when mine can't find a scripted answer: (fyi: there is a bit of work to nltk, it's not just a simple import to get the wordnet and stuff that processes for it) ...