Skip to content

Commit 250f6c7

Browse files
committed
Fix typos discovered by codespell
1 parent 41e0777 commit 250f6c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+232
-175
lines changed

extra/DEVELOPER_DOCS/Listeners.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ model = chain(
194194
)
195195
```
196196

197-
but the standalone `Tok2VecTransformer` has an additional `split_trf_batch` chained inbetween the model
197+
but the standalone `Tok2VecTransformer` has an additional `split_trf_batch` chained in between the model
198198
and `trfs2arrays`:
199199

200200
```

extra/DEVELOPER_DOCS/Satellite Packages.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is a list of all the active repos relevant to spaCy besides the main one, w
66

77
These packages are always pulled in when you install spaCy. Most of them are direct dependencies, but some are transitive dependencies through other packages.
88

9-
- [spacy-legacy](https://github.com/explosion/spacy-legacy): When an architecture in spaCy changes enough to get a new version, the old version is frozen and moved to spacy-legacy. This allows us to keep the core library slim while also preserving backwards compatability.
9+
- [spacy-legacy](https://github.com/explosion/spacy-legacy): When an architecture in spaCy changes enough to get a new version, the old version is frozen and moved to spacy-legacy. This allows us to keep the core library slim while also preserving backwards compatibility.
1010
- [thinc](https://github.com/explosion/thinc): Thinc is the machine learning library that powers trainable components in spaCy. It wraps backends like Numpy, PyTorch, and Tensorflow to provide a functional interface for specifying architectures.
1111
- [catalogue](https://github.com/explosion/catalogue): Small library for adding function registries, like those used for model architectures in spaCy.
1212
- [confection](https://github.com/explosion/confection): This library contains the functionality for config parsing that was formerly contained directly in Thinc.
@@ -67,7 +67,7 @@ These repos are used to support the spaCy docs or otherwise present information
6767

6868
These repos are used for organizing data around spaCy, but are not something an end user would need to install as part of using the library.
6969

70-
- [spacy-models](https://github.com/explosion/spacy-models): This repo contains metadata (but not training data) for all the spaCy models. This includes information about where their training data came from, version compatability, and performance information. It also includes tests for the model packages, and the built models are hosted as releases of this repo.
70+
- [spacy-models](https://github.com/explosion/spacy-models): This repo contains metadata (but not training data) for all the spaCy models. This includes information about where their training data came from, version compatibility, and performance information. It also includes tests for the model packages, and the built models are hosted as releases of this repo.
7171
- [wheelwright](https://github.com/explosion/wheelwright): A tool for automating our PyPI builds and releases.
7272
- [ec2buildwheel](https://github.com/explosion/ec2buildwheel): A small project that allows you to build Python packages in the manner of cibuildwheel, but on any EC2 image. Used by wheelwright.
7373

extra/DEVELOPER_DOCS/StringStore-Vocab.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ These are things stored in the vocab:
145145
- `get_noun_chunks`: a syntax iterator
146146
- lex attribute getters: functions like `is_punct`, set in language defaults
147147
- `cfg`: **not** the pipeline config, this is mostly unused
148-
- `_unused_object`: Formerly an unused object, kept around until v4 for compatability
148+
- `_unused_object`: Formerly an unused object, kept around until v4 for compatibility
149149

150150
Some of these, like the Morphology and Vectors, are complex enough that they
151151
need their own explanations. Here we'll just look at Vocab-specific items.

extra/example_data/textcat_example_data/CC_BY-SA-3.0.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ CONDITIONS.
3434
Collection will not be considered an Adaptation for the purpose of
3535
this License. For the avoidance of doubt, where the Work is a musical
3636
work, performance or phonogram, the synchronization of the Work in
37-
timed-relation with a moving image ("synching") will be considered an
37+
timed-relation with a moving image ("syncing") will be considered an
3838
Adaptation for the purpose of this License.
3939
b. "Collection" means a collection of literary or artistic works, such as
4040
encyclopedias and anthologies, or performances, phonograms or
@@ -264,7 +264,7 @@ subject to and limited by the following restrictions:
264264
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
265265
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
266266
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
267-
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
267+
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY,
268268
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
269269
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
270270
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION

spacy/cli/_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def parse_config_overrides(
9999
RETURNS (Dict[str, Any]): The parsed dict, keyed by nested config setting.
100100
"""
101101
env_string = os.environ.get(env_var, "") if env_var else ""
102-
env_overrides = _parse_overrides(split_arg_string(env_string))
102+
env_overrides = _parse_overrides(split_arg_string(env_string)) # type: ignore[operator]
103103
cli_overrides = _parse_overrides(args, is_cli=True)
104104
if cli_overrides:
105105
keys = [k for k in cli_overrides if k not in env_overrides]

spacy/cli/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def info(
8484

8585

8686
def info_spacy() -> Dict[str, Any]:
87-
"""Generate info about the current spaCy intallation.
87+
"""Generate info about the current spaCy installation.
8888
8989
RETURNS (dict): The spaCy info.
9090
"""

spacy/glossary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def explain(term):
354354
# https://github.com/ltgoslo/norne
355355
"EVT": "Festivals, cultural events, sports events, weather phenomena, wars, etc.",
356356
"PROD": "Product, i.e. artificially produced entities including speeches, radio shows, programming languages, contracts, laws and ideas",
357-
"DRV": "Words (and phrases?) that are dervied from a name, but not a name in themselves, e.g. 'Oslo-mannen' ('the man from Oslo')",
357+
"DRV": "Words (and phrases?) that are derived from a name, but not a name in themselves, e.g. 'Oslo-mannen' ('the man from Oslo')",
358358
"GPE_LOC": "Geo-political entity, with a locative sense, e.g. 'John lives in Spain'",
359359
"GPE_ORG": "Geo-political entity, with an organisation sense, e.g. 'Spain declined to meet with Belgium'",
360360
}

spacy/lang/ht/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
from ...language import BaseDefaults, Language
66
from .lemmatizer import HaitianCreoleLemmatizer
77
from .lex_attrs import LEX_ATTRS
8-
from .punctuation import TOKENIZER_PREFIXES, TOKENIZER_INFIXES, TOKENIZER_SUFFIXES
8+
from .punctuation import TOKENIZER_INFIXES, TOKENIZER_PREFIXES, TOKENIZER_SUFFIXES
99
from .stop_words import STOP_WORDS
1010
from .syntax_iterators import SYNTAX_ITERATORS
11-
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
1211
from .tag_map import TAG_MAP
12+
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
1313

1414

1515
class HaitianCreoleDefaults(BaseDefaults):
@@ -22,10 +22,12 @@ class HaitianCreoleDefaults(BaseDefaults):
2222
stop_words = STOP_WORDS
2323
tag_map = TAG_MAP
2424

25+
2526
class HaitianCreole(Language):
2627
lang = "ht"
2728
Defaults = HaitianCreoleDefaults
2829

30+
2931
@HaitianCreole.factory(
3032
"lemmatizer",
3133
assigns=["token.lemma"],
@@ -49,4 +51,5 @@ def make_lemmatizer(
4951
nlp.vocab, model, name, mode=mode, overwrite=overwrite, scorer=scorer
5052
)
5153

54+
5255
__all__ = ["HaitianCreole"]

spacy/lang/ht/lemmatizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from typing import List, Tuple
22

3+
from ...lookups import Lookups
34
from ...pipeline import Lemmatizer
45
from ...tokens import Token
5-
from ...lookups import Lookups
66

77

88
class HaitianCreoleLemmatizer(Lemmatizer):

spacy/lang/ht/lex_attrs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"P": "Pa",
5050
}
5151

52+
5253
def like_num(text):
5354
text = text.strip().lower()
5455
if text.startswith(("+", "-", "±", "~")):
@@ -69,9 +70,11 @@ def like_num(text):
6970
return True
7071
return False
7172

73+
7274
def norm_custom(text):
7375
return NORM_MAP.get(text, text.lower())
7476

77+
7578
LEX_ATTRS = {
7679
LIKE_NUM: like_num,
7780
NORM: norm_custom,

0 commit comments

Comments
 (0)