nltk/nltk — pull request #336 by cadaeib (2013-01-05 05:18:21+00:00)
Title: fixed doctype regex to handle doctype tag w/o square brackets

If there's no '[' in the DOCTYPE declaration, [^\[]* will match as much of the block as possible, "eating" several start tags that we don't actually want to skip. This breaks [the sense-tagged WordNet corpus](http://wordnet.princeton.edu/glosstag.shtml).

Since the XML spec doesn't allow ">" in names, this fix shouldn't break anything. Running runtests.py fails, but it fails with the same errors as without this fix, so the errors are (hopefully) not mine. (Should I write tests for this? I've tested it with the WordNet corpus, but I'm not sure if it's worth adding a unit test for this, especially since I'm not adding anything new.)