Yes, class you're referring to uses ``nltk.compat.python_2_unicode_compatible`` decorator. This decorator takes care of encodings and requires Python 3.x semantics for ``__str__`` and ``__repr__`` (they must return unicode when this decorator is used).