nltk/nltk — pull request #515 by usami (2013-10-26 03:13:00+00:00)
Title: Fix stem.doctest failures

I run doctest for stemmers and got the following failures:

$ python -m doctest nltk/test/stem.doctest
**********************************************************************
File "nltk/test/stem.doctest", line 53, in stem.doctest
Failed example:
stemmer.stem("hurried")
Expected:
'hurri'
Got:
u'hurri'
**********************************************************************
File "nltk/test/stem.doctest", line 56, in stem.doctest
Failed example:
stemmer.stem("advisable")
Expected:
'advis'
Got:
u'advis'
**********************************************************************
File "nltk/test/stem.doctest", line 69, in stem.doctest
Failed example:
print(" ".join(SnowballStemmer.languages))
Expected:
danish dutch english finnish french german hungarian italian
norwegian porter portuguese romanian russian spanish swedish
Got:
danish dutch english finnish french german hungarian italian norwegian porter portuguese romanian russian spanish swedish
**********************************************************************
1 items had failures:
3 of 23 in stem.doctest
***Test Failed*** 3 failures.

The first and second failures were caused because doctest did not expect unicode output. The last failure was caused by missing NORMALIZE_WHITESPACE option.

This pull request resolves these issues and now stemmers can pass all tests.