spaCy/spacy/tests/vocab_vectors
Madeesh Kannan 446a3ecf34
StringStore refactoring (#11344)
* `strings`: Remove unused `hash32_utf8` function

* `strings`: Make `hash_utf8` and `decode_Utf8Str` private

* `strings`: Reorganize private functions

* 'strings': Raise error when non-string/-int types are passed to functions that don't accept them

* `strings`: Add `items()` method, add type hints, remove unused methods, restrict inputs to specific types, reorganize methods

* `Morphology`: Use `StringStore.items()` to enumerate features when pickling

* `test_stringstore`: Update pre-Python 3 tests

* Update `StringStore` docs

* Fix `get_string_id` imports

* Replace redundant test with tests for type checking

* Rename `_retrieve_interned_str`, remove `.get` default arg

* Add `get_string_id` to `strings.pyi`
Remove `mypy` ignore directives from imports of the above

* `strings.pyi`: Replace functions that consume `Union`-typed params with overloads

* `strings.pyi`: Revert some function signatures

* Update `SYMBOLS_BY_INT` lookups and error codes post-merge

* Revert clobbered change introduced in a previous merge

* Remove unnecessary type hint

* Invert tuple order in `StringStore.items()`

* Add test for `StringStore.items()`

* Revert "`Morphology`: Use `StringStore.items()` to enumerate features when pickling"

This reverts commit 1af9510ceb.

* Rename `keys` and `key_map`

* Add `keys()` and `values()`

* Add comment about the inverted key-value semantics in the API

* Fix type hints

* Implement `keys()`, `values()`, `items()` without generators

* Fix type hints, remove unnecessary boxing

* Update docs

* Simplify `keys/values/items()` impl

* `mypy` fix

* Fix error message, doc fixes
2022-10-06 10:51:06 +02:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_lexeme.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_lookups.py unskipping tests with python >= 3.6 2020-12-30 18:46:43 +01:00
test_similarity.py Update vector handling in similarity methods (#11013) 2022-06-28 19:50:47 +02:00
test_stringstore.py StringStore refactoring (#11344) 2022-10-06 10:51:06 +02:00
test_vectors.py Update vector handling in similarity methods (#11013) 2022-06-28 19:50:47 +02:00
test_vocab_api.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00