From 6eb6306843581e5de579837b6fd4d4fbaf4d829f Mon Sep 17 00:00:00 2001 From: ines Date: Mon, 8 May 2017 23:58:31 +0200 Subject: [PATCH] Fix language data imports --- spacy/language.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/spacy/language.py b/spacy/language.py index da02df53d..b6f2d343c 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -16,10 +16,12 @@ from .syntax.arc_eager import ArcEager from .syntax.ner import BiluoPushDown from .compat import json_dumps from .attrs import IS_STOP +from .lang.punctuation import TOKENIZER_PREFIXES, TOKENIZER_SUFFIXES, TOKENIZER_INFIXES +from .lang.tokenizer_exceptions import TOKEN_MATCH +from .lang.tag_map import TAG_MAP from . import attrs from . import orth from . import util -from . import language_data class BaseDefaults(object): @@ -135,11 +137,11 @@ class BaseDefaults(object): pipeline.append(nlp.entity) return pipeline - token_match = language_data.TOKEN_MATCH - prefixes = tuple(language_data.TOKENIZER_PREFIXES) - suffixes = tuple(language_data.TOKENIZER_SUFFIXES) - infixes = tuple(language_data.TOKENIZER_INFIXES) - tag_map = dict(language_data.TAG_MAP) + token_match = TOKEN_MATCH + prefixes = tuple(TOKENIZER_PREFIXES) + suffixes = tuple(TOKENIZER_SUFFIXES) + infixes = tuple(TOKENIZER_INFIXES) + tag_map = dict(TAG_MAP) tokenizer_exceptions = {} parser_features = get_templates('parser') entity_features = get_templates('ner')