[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/nn and fo language extensions #13116

Merged
merged 15 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix import order and use relative imports in fo/__nit__.py and nn/__i…
…nit__.py
  • Loading branch information
lise-brinck committed Nov 8, 2023
commit 7281c73ad295ea250c201f5ef29c70a7fc8b34c0
11 changes: 2 additions & 9 deletions spacy/lang/fo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import spacy
from ...language import BaseDefaults, Language
from ..punctuation import TOKENIZER_INFIXES, TOKENIZER_PREFIXES, TOKENIZER_SUFFIXES
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from spacy.lang.punctuation import (
TOKENIZER_SUFFIXES,
TOKENIZER_PREFIXES,
TOKENIZER_INFIXES,
)

from spacy.language import Language, BaseDefaults


class FaroeseDefaults(BaseDefaults):
Expand All @@ -16,7 +10,6 @@ class FaroeseDefaults(BaseDefaults):
prefixes = TOKENIZER_PREFIXES


@spacy.registry.languages("fo")
class Faroese(Language):
lang = "fo"
Defaults = FaroeseDefaults
Expand Down
6 changes: 2 additions & 4 deletions spacy/lang/nn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import spacy
from spacy.language import BaseDefaults, Language
from ...language import BaseDefaults, Language
from ..nb import SYNTAX_ITERATORS
from .punctuation import TOKENIZER_INFIXES, TOKENIZER_PREFIXES, TOKENIZER_SUFFIXES
from spacy.lang.nb import SYNTAX_ITERATORS
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS


Expand All @@ -13,7 +12,6 @@ class NorwegianNynorskDefaults(BaseDefaults):
syntax_iterators = SYNTAX_ITERATORS


@spacy.registry.languages("nn")
class NorwegianNynorsk(Language):
lang = "nn"
Defaults = NorwegianNynorskDefaults
Expand Down