Move update_exc to global language data utils

This commit is contained in:
Ines Montani 2016-12-17 12:29:02 +01:00
parent f324311249
commit 6a60a61086
7 changed files with 6 additions and 12 deletions

View File

@ -6,8 +6,8 @@ from os import path
from ..language import Language
from ..attrs import LANG
from . import language_data
from ..util import update_exc
from ..language_data import update_exc
from ..language_data import EMOTICONS
from .language_data import ORTH_ONLY
from .language_data import strings_to_exc

View File

@ -10,8 +10,8 @@ from ..lemmatizer import Lemmatizer
from ..vocab import Vocab
from ..tokenizer import Tokenizer
from ..attrs import LANG
from ..util import update_exc
from ..language_data import update_exc
from ..language_data import EMOTICONS
from .language_data import ORTH_ONLY
from .language_data import strings_to_exc

View File

@ -6,8 +6,8 @@ from os import path
from ..language import Language
from . import language_data
from ..attrs import LANG
from ..util import update_exc
from ..language_data import update_exc
from ..language_data import EMOTICONS
from .language_data import ORTH_ONLY
from .language_data import strings_to_exc

View File

@ -6,8 +6,8 @@ from os import path
from ..language import Language
from . import language_data
from ..attrs import LANG
from ..util import update_exc
from ..language_data import update_exc
from ..language_data import EMOTICONS
from .language_data import ORTH_ONLY
from .language_data import strings_to_exc

View File

@ -6,8 +6,8 @@ from os import path
from ..language import Language
from . import language_data
from ..attrs import LANG
from ..util import update_exc
from ..language_data import update_exc
from ..language_data import EMOTICONS
from .language_data import ORTH_ONLY
from .language_data import strings_to_exc

View File

@ -6,8 +6,8 @@ from os import path
from ..language import Language
from . import language_data
from ..attrs import LANG
from ..util import update_exc
from ..language_data import update_exc
from ..language_data import EMOTICONS
from .language_data import ORTH_ONLY
from .language_data import strings_to_exc

View File

@ -108,12 +108,6 @@ def compile_infix_regex(entries):
return re.compile(expression)
def update_exc(exc, additions):
overlap = set(exc.keys()).intersection(set(additions))
assert not overlap, overlap
exc.update(additions)
def normalize_slice(length, start, stop, step=None):
if not (step is None or step == 1):
raise ValueError("Stepped slices not supported in Span objects."