From 279895ea83f7b7ffa2d5c81316e28a5f34717fc2 Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 8 May 2017 15:51:39 +0200 Subject: [PATCH] Reorganise Dutch language data --- spacy/nl/__init__.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/spacy/nl/__init__.py b/spacy/nl/__init__.py index 9c9da6bcd..446d920e6 100644 --- a/spacy/nl/__init__.py +++ b/spacy/nl/__init__.py @@ -1,9 +1,13 @@ # coding: utf8 -from __future__ import unicode_literals, print_function +from __future__ import unicode_literals +from .stop_words import STOP_WORDS + +from ..language_data import BASE_EXCEPTIONS from ..language import Language from ..attrs import LANG -from .language_data import * +from ..util import update_exc + class Dutch(Language): @@ -13,8 +17,8 @@ class Dutch(Language): lex_attr_getters = dict(Language.Defaults.lex_attr_getters) lex_attr_getters[LANG] = lambda text: 'nl' - tokenizer_exceptions = TOKENIZER_EXCEPTIONS - stop_words = STOP_WORDS + tokenizer_exceptions = update_exc(BASE_EXCEPTIONS) + stop_words = set(STOP_WORDS) -EXPORT = Dutch \ No newline at end of file +__all__ = ['Dutch']