nltk/nltk — pull request #305 by jkarni (2012-11-07 21:35:14+00:00)
Title: Improvement in the _substitute method in chat/util.py

Hi,

I'm hoping to contribute a bit to the chat bots, but as a quick first patch, I've changed the _substitute function so that now it can use multiword reflections. It is now a "greedy" (longest non-overlapping matches between str and reflections.keys()) regex-based substitution.
I've also change a couple of the keys and values in the reflections dict, now that multi-word matches are allowed.
Let me know if I'm missing something in the procedure.

Cheers,
Julian
jkarni - at - gmail - dotcom