aboSamoor / polyglot

Multilingual text (NLP) processing toolkit
http://polyglot-nlp.com
Other
2.31k stars 337 forks source link

Fix rare unicode encode error on entity extraction #35

Closed syscmp closed 8 years ago

syscmp commented 8 years ago

Example to trigger bug:

# -*- coding: utf-8 -*-
from polyglot.text import Text
text = u'Beginn der Aktion zum 100jährigen Bestehen dieser Einrichtung ist am Sonnabend, 6. Mai, um 11 Uhr auf dem Hanseatenhof in der Innenstadt.'
t = Text(text)
t.entities