Merge pull request #385 from spacy-io/revert-384-master

Revert "Fix get_lang_class parsing"
This commit is contained in:
Matthew Honnibal 2016-05-17 08:04:44 +10:00
commit 88538b339e
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def set_lang_class(name, cls):
def get_lang_class(name):
lang = re.split('_', name, 1)[0]
lang = re.split('[^a-zA-Z0-9_]', name, 1)[0]
if lang not in LANGUAGES:
raise RuntimeError('Language not supported: %s' % lang)
return LANGUAGES[lang]