About Hemmingway
Frequently Asked Questions
- What is this?
- What’s in it for you?
- Why AIML?
- How does it work?
- What do I say to him?
- Why is Hemmingway such a grump?
- What’s with the double m?
Hemmingway is an automated chat program or chatterbot based on “Alicebot” or AIML technology. It’s an online manifestation of a character I wrote in a short story around 2001. In a nutshell the program takes what you say and runs it through a processor to find a pre-coded (and hopefully appropriate) response. However, it goes a little further than a simple stimulus-response mechanism. Hemmingway, like all AIML-based chatterbots looks for common patterns of speech and links certain phrases together according to their meaning. For instance Hemmingway considers “What do you think of x?” as being exactly the same as “Do you like x?” The variation in meaning between the two questions is small enough that the author gets away with linking the two. Therein lies the enduring interest in AIML. It’s part language deconstruction, part parlour trick: fertile ground for a fiction writer.
Good question. If you mean remuneration, then the answer is “nothing”. So why spend all those hours writing code that earns not one jot? Originally Hemmingway was conceived as a marketing exercise for a book I had written, a collection of short stories that features the text version of the original Hemmingway story. He was intended as a minor diversion and part time salesman for the book. Some of that code remains in Hemmingway if you can find the right words to elicit the responses. Over time the project grew into its present form and I felt that Hemmingway deserved a place as a work of fiction in his own right, distinct from my other work. After three years of part time coding in the dead of night it felt like the time was right to bring the old bastard out into the open unshackled to any marketing or promotion.
AIML is an acronym for Artificial Intelligence Markup Language. I came across Alice and AIML in my research for the original Hemmingway story. When that story gained a modicum of success I immediately looked for ways of beating that dead horse into the ground. For someone with a background in web design, AIML didn’t seem too far removed from HTML, the universal language of the World Wide Web. The character was a custom fit for creating a chatterbot, since that was the model I used to create the original story character. It seemed like a good idea at the time, something that I could quickly churn out as a minor distraction from my proper writing. Excuse me while I laugh nervously.
One of Hemmingway’s basic functions is to graph language. He does this by taking what you say to him one word at a time starting at the beginning (There are complications to this, but I’m trying to keep it simple). If you say “I have a lovely bunch of coconuts”, Hemmingway first looks for a match for the input: “I”, then “I HAVE”, then “I HAVE A” and so forth until he reaches a dead end. The dead end might be an exact match, or it might be a “catch-all”. The example above matches “I HAVE A *”, which means Hemmingway may respond with: “You obviously have a good lovely bunch of coconuts supplier.” Appropriate? Sort of. Funny? Well I think so. My rule of thumb with any “catch-all” is that funnier should always win over more correct.
We could get into a long discussion on creating AIML with fiction in mind, but this doesn’t seem the best forum for that. There are plenty of discussions on the Alicebot mailing list and http://www.alicebot.org/. You can also download tools to create your own chatter bot. Be warned, though. Mine has taken three years and it’s still nowhere near complete.
Say anything you like. If he doesn’t understand he’ll steer you back to more comfortable topics. He does like to talk about himself and his writing. He can offer you samples of his “hack-work” and he knows a handful of other writers and is more than happy to share his thoughts on them, or ask you about them. If you trip him up and he spits out gobbledegook, congratulations! Your input will be used to make his responses better next time you log in. Feel free to teach him things about your favourite novel or author (although if you wait he will ask you about them). He might dismiss what you say, but don’t worry. I’m always looking over his shoulder.
Why is Hemmingway such a grump?
Don’t be such a wuss, he’s not that bad. He treads a very fine line, though. One thing I noticed about almost all the other chatterbots in existence is their sickly subservience. They’re all so polite and apologetic; they were completely at odds with the character I had conceived in the Hemmingway short story. But as his character developed further within the AIML writing process, Hemmingway’s paradoxical nature was thrown into sharp relief. He considers himself above humans, and yet seeks their approval by attempting to win literary prizes. He is quite happy to dismiss you, yet he needs your conversation data to research human behaviour to allow him to write this “masterpiece” he keeps referring to. As his author I can safely say I’ve placed him in a very awkward situation. It’s no wonder he’s grouchy, especially at me. Cut him a little slack. He’ll keep talking as long as you do.
You’d better ask him that.


