From 1582656175e7b19b92679d4ba8576d003e033a0c Mon Sep 17 00:00:00 2001 From: Lise Brinck Date: Tue, 7 Nov 2023 13:17:11 +0100 Subject: [PATCH] use relative imports --- spacy/lang/fo/tokenizer_exceptions.py | 7 +++---- spacy/lang/nn/punctuation.py | 4 ++-- spacy/lang/nn/tokenizer_exceptions.py | 6 +++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/spacy/lang/fo/tokenizer_exceptions.py b/spacy/lang/fo/tokenizer_exceptions.py index d3d24a47a..856b72200 100644 --- a/spacy/lang/fo/tokenizer_exceptions.py +++ b/spacy/lang/fo/tokenizer_exceptions.py @@ -1,7 +1,6 @@ -"""Exceptions for the faroese tokenizer - mainly abbreviations copied from CD-ORD ressources""" -from spacy.lang.tokenizer_exceptions import BASE_EXCEPTIONS -from spacy.util import update_exc -from spacy.symbols import ORTH +from ...symbols import ORTH +from ...util import update_exc +from ..tokenizer_exceptions import BASE_EXCEPTIONS _exc = {} diff --git a/spacy/lang/nn/punctuation.py b/spacy/lang/nn/punctuation.py index 8e5de07c9..7b50b58d3 100644 --- a/spacy/lang/nn/punctuation.py +++ b/spacy/lang/nn/punctuation.py @@ -1,4 +1,4 @@ -from spacy.lang.char_classes import ( +from ..char_classes import ( ALPHA, ALPHA_LOWER, ALPHA_UPPER, @@ -12,7 +12,7 @@ from spacy.lang.char_classes import ( PUNCT, UNITS, ) -from spacy.lang.punctuation import TOKENIZER_SUFFIXES +from ..punctuation import TOKENIZER_SUFFIXES _quotes = CONCAT_QUOTES.replace("'", "") _list_punct = [x for x in LIST_PUNCT if x != "#"] diff --git a/spacy/lang/nn/tokenizer_exceptions.py b/spacy/lang/nn/tokenizer_exceptions.py index 4c9e1eace..08552dd90 100644 --- a/spacy/lang/nn/tokenizer_exceptions.py +++ b/spacy/lang/nn/tokenizer_exceptions.py @@ -1,6 +1,6 @@ -from spacy.symbols import NORM, ORTH -from spacy.util import update_exc -from spacy.lang.tokenizer_exceptions import BASE_EXCEPTIONS +from ...symbols import NORM, ORTH +from ...util import update_exc +from ..tokenizer_exceptions import BASE_EXCEPTIONS _exc = {}