From 699dd8b3b7a21dfdc71c740de7096f5d9cb5d646 Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Mon, 16 Oct 2023 10:17:47 +0200 Subject: [PATCH] Update __all__ fields (#13063) * update all for pipeline.init * add all in training.init * add all in kb.init * alphabetically --- spacy/kb/__init__.py | 8 ++++++++ spacy/matcher/__init__.py | 2 +- spacy/pipeline/__init__.py | 1 + spacy/tokens/__init__.py | 2 +- spacy/training/__init__.py | 25 +++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 2 deletions(-) diff --git a/spacy/kb/__init__.py b/spacy/kb/__init__.py index 3ce3e4c332b..93a65ab6194 100644 --- a/spacy/kb/__init__.py +++ b/spacy/kb/__init__.py @@ -1,3 +1,11 @@ from .candidate import Candidate, get_candidates, get_candidates_batch from .kb import KnowledgeBase from .kb_in_memory import InMemoryLookupKB + +__all__ = [ + "Candidate", + "KnowledgeBase", + "InMemoryLookupKB", + "get_candidates", + "get_candidates_batch", +] diff --git a/spacy/matcher/__init__.py b/spacy/matcher/__init__.py index f671f2e3524..b6d6d70ab36 100644 --- a/spacy/matcher/__init__.py +++ b/spacy/matcher/__init__.py @@ -3,4 +3,4 @@ from .matcher import Matcher from .phrasematcher import PhraseMatcher -__all__ = ["Matcher", "PhraseMatcher", "DependencyMatcher", "levenshtein"] +__all__ = ["DependencyMatcher", "Matcher", "PhraseMatcher", "levenshtein"] diff --git a/spacy/pipeline/__init__.py b/spacy/pipeline/__init__.py index 40e3fd6389d..2c4a5a8a87f 100644 --- a/spacy/pipeline/__init__.py +++ b/spacy/pipeline/__init__.py @@ -22,6 +22,7 @@ __all__ = [ "AttributeRuler", "DependencyParser", + "EditTreeLemmatizer", "EntityLinker", "EntityRecognizer", "EntityRuler", diff --git a/spacy/tokens/__init__.py b/spacy/tokens/__init__.py index f4b2bf02212..3393ca6eca9 100644 --- a/spacy/tokens/__init__.py +++ b/spacy/tokens/__init__.py @@ -5,4 +5,4 @@ from .span_group import SpanGroup from .token import Token -__all__ = ["Doc", "Token", "Span", "SpanGroup", "DocBin", "MorphAnalysis"] +__all__ = ["Doc", "DocBin", "MorphAnalysis", "Span", "SpanGroup", "Token"] diff --git a/spacy/training/__init__.py b/spacy/training/__init__.py index b8c0792f039..5c2ba99320d 100644 --- a/spacy/training/__init__.py +++ b/spacy/training/__init__.py @@ -16,3 +16,28 @@ tags_to_entities, ) from .loggers import console_logger # noqa: F401 + +__all__ = [ + "Alignment", + "Corpus", + "Example", + "JsonlCorpus", + "PlainTextCorpus", + "biluo_tags_to_offsets", + "biluo_tags_to_spans", + "biluo_to_iob", + "create_copy_from_base_model", + "docs_to_json", + "dont_augment", + "iob_to_biluo", + "minibatch_by_padded_size", + "minibatch_by_words", + "offsets_to_biluo_tags", + "orth_variants_augmenter", + "read_json_file", + "remove_bilu_prefix", + "split_bilu_label", + "tags_to_entities", + "validate_get_examples", + "validate_examples", +]