spaCy/spacy/tests/doc
Edward 5afa98aabf
Support custom attributes for tokens and spans in json conversion (#11125)
* Add token and span custom attributes to to_json()

* Change logic for to_json

* Add functionality to from_json

* Small adjustments

* Move token/span attributes to new dict key

* Fix test

* Fix the same test but much better

* Add backwards compatibility tests and adjust logic

* Add test to check if attributes not set in underscore are not saved in the json

* Add tests for json compatibility

* Adjust test names

* Fix tests and clean up code

* Fix assert json tests

* small adjustment

* adjust naming and code readability

* Adjust naming, added more tests and changed logic

* Fix typo

* Adjust errors, naming, and small test optimization

* Fix byte tests

* Fix bytes tests

* Change naming and json structure

* update schema

* Update spacy/schemas.py

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>

* Update spacy/tokens/doc.pyx

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>

* Update spacy/tokens/doc.pyx

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>

* Update spacy/schemas.py

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>

* Update schema for underscore attributes

* Adjust underscore schema

* adjust schema tests

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2022-08-23 10:05:02 +02:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_add_entities.py Support negative examples in partial NER annotations (#8106) 2021-06-17 17:33:00 +10:00
test_array.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_creation.py Validate pos values when creating Doc (#9148) 2021-09-16 13:28:05 +02:00
test_doc_api.py Clean up warnings in the test suite (#11331) 2022-08-22 12:04:30 +02:00
test_graph.py Tidy up and auto-format 2021-01-15 11:57:36 +11:00
test_json_doc_conversion.py Support custom attributes for tokens and spans in json conversion (#11125) 2022-08-23 10:05:02 +02:00
test_morphanalysis.py Tidy up and auto-format 2020-10-03 17:20:18 +02:00
test_pickle_doc.py Avoid pickling Doc inputs passed to Language.pipe() (#10864) 2022-06-02 20:06:49 +02:00
test_retokenize_merge.py Tidy up with flake8: imports, comparisons, etc. 2021-06-28 12:08:15 +02:00
test_retokenize_split.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_span_group.py Support more internal methods for SpanGroup (#10476) 2022-04-01 09:56:26 +02:00
test_span.py Add SpanRuler component (#9880) 2022-06-02 13:12:53 +02:00
test_token_api.py Auto-format code with black (#9234) 2021-09-20 08:49:19 +02:00
test_underscore.py Merge branch 'master' into tmp/sync 2020-03-26 13:38:14 +01:00