spaCy/spacy/matcher
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 Add levenshtein from polyleven (#11418) 2022-09-14 17:05:22 +02:00
dependencymatcher.pyi Update typing hints (#10109) 2022-01-28 16:59:54 +01:00
dependencymatcher.pyx Update/remove old Matcher syntax (#11370) 2022-08-30 15:40:31 +02:00
levenshtein.pyx Add levenshtein from polyleven (#11418) 2022-09-14 17:05:22 +02:00
matcher.pxd Support match alignments (#7321) 2021-04-08 18:10:14 +10:00
matcher.pyi Update typing hints (#10109) 2022-01-28 16:59:54 +01:00
matcher.pyx StringStore refactoring (#11344) 2022-10-06 10:51:06 +02:00
phrasematcher.pxd Run PhraseMatcher on Spans (#6918) 2021-02-10 23:43:32 +11:00
phrasematcher.pyi Update/remove old Matcher syntax (#11370) 2022-08-30 15:40:31 +02:00
phrasematcher.pyx Update/remove old Matcher syntax (#11370) 2022-08-30 15:40:31 +02:00
polyleven.c Add levenshtein from polyleven (#11418) 2022-09-14 17:05:22 +02:00