spaCy/spacy
Madeesh Kannan 59c763eec1
StringStore-related optimizations (#10938)
* `strings`: More roubust type checking of keys/IDs, coerce `int`-like types to `hash_t`

* Preserve existing public API behaviour

* Fix return type

* Replace `bool` with `bint`, rename to `_try_coerce_to_hash`, replace `id` with `hash`

* Avoid unnecessary re-encoding and re-calculation of strings and hashs respectively

* Rename variables named `hash`
Add comment on early return
2022-07-04 15:04:03 +02:00
..
cli
displacy
lang
matcher
ml
pipeline
tests
tokens
training
__init__.pxd
__init__.py
__main__.py
about.py
attrs.pxd
attrs.pyx
compat.py
default_config_pretraining.cfg
default_config.cfg
errors.py
glossary.py
kb.pxd
kb.pyx
language.py
lexeme.pxd
lexeme.pyi
lexeme.pyx
lookups.py
morphology.pxd
morphology.pyx
parts_of_speech.pxd
parts_of_speech.pyx
pipe_analysis.py
py.typed
schemas.py
scorer.py
strings.pxd StringStore-related optimizations (#10938) 2022-07-04 15:04:03 +02:00
strings.pyi
strings.pyx StringStore-related optimizations (#10938) 2022-07-04 15:04:03 +02:00
structs.pxd
symbols.pxd
symbols.pyx
tokenizer.pxd
tokenizer.pyx
ty.py
typedefs.pxd
typedefs.pyx
util.py
vectors.pyx
vocab.pxd
vocab.pyi
vocab.pyx