nltk/nltk — pull request #346 by alexrudnick (2013-01-17 19:29:46+00:00)
Title: Fix for decision trees with binary=True

Fixes #297 and makes sure that decision stumps work on Python 3 by doing two things:

* In the binary stumps, if we haven't seen any positive (or negative) events, have sensible defaults for when we haven't seen an event of that type, instead of failing when we ask for the most common label on positive/negative events.
* In Python 3, .keys() on a dictionary doesn't return a list, so we can't index into it. Make it a list!