spaCy/spacy/tokens
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__.pxd * Break up tokens.pyx into tokens/doc.pyx, tokens/token.pyx, tokens/spans.pyx 2015-07-13 20:20:58 +02:00
__init__.py Make stable private modules public and adjust names (#11353) 2022-08-30 13:56:35 +02:00
doc_bin.py Make stable private modules public and adjust names (#11353) 2022-08-30 13:56:35 +02:00
doc.pxd Store activations in Docs when save_activations is enabled (#11002) 2022-09-13 09:51:12 +02:00
doc.pyi Merge branch 'copy_develop' into copy_v4 2022-10-03 14:12:16 +02:00
doc.pyx Merge branch 'copy_develop' into copy_v4 2022-10-03 14:12:16 +02:00
graph.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
graph.pyx StringStore refactoring (#11344) 2022-10-06 10:51:06 +02:00
morphanalysis.pxd Morphology/Morphologizer optimizations and refactoring (#11024) 2022-07-15 11:14:08 +02:00
morphanalysis.pyi 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
morphanalysis.pyx Morphology/Morphologizer optimizations and refactoring (#11024) 2022-07-15 11:14:08 +02:00
retokenizer.pyi Make stable private modules public and adjust names (#11353) 2022-08-30 13:56:35 +02:00
retokenizer.pyx StringStore refactoring (#11344) 2022-10-06 10:51:06 +02:00
span_group.pxd Span/SpanGroup: wrap SpanC in shared_ptr (#9869) 2022-01-12 13:38:52 +01:00
span_group.pyi SpanGroup(s)-related optimizations (#11380) 2022-08-31 09:03:20 +02:00
span_group.pyx Merge branch 'develop' into merge-develop-into-v4 2022-09-07 11:35:47 +02:00
span_groups.py Merge branch 'develop' into merge-develop-into-v4 2022-09-07 11:35:47 +02:00
span.pxd Span/SpanGroup: wrap SpanC in shared_ptr (#9869) 2022-01-12 13:38:52 +01:00
span.pyi Make Span/Doc.ents more consistent for ent_kb_id and ent_id (#11328) 2022-08-22 20:28:57 +02:00
span.pyx Make Span/Doc.ents more consistent for ent_kb_id and ent_id (#11328) 2022-08-22 20:28:57 +02:00
token.pxd cleanup 2021-01-13 14:20:05 +01:00
token.pyi 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
token.pyx Merge remote-tracking branch 'upstream/master' into merge-master-v4-20220728 2022-07-28 13:53:59 +02:00
underscore.py Update typing hints (#10109) 2022-01-28 16:59:54 +01:00