spaCy/spacy/tests/doc
Adriane Boyd b60b027927
Add default option to MorphAnalysis.get (#12545)
* Add default to MorphAnalysis.get

Similar to `dict`, allow a `default` option for `MorphAnalysis.get` for
the user to provide a default return value if the field is not found.
The default return value remains `[]`, which is not the same as
`dict.get`, but is already established as this method's default return
value with the return type `List[str]`. However the new `default` option
does not enforce that the user-provided default is actually `List[str]`.

* Restore test case
2023-04-20 14:06:32 +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 Cast to uint64 for all array-based doc representations (#11933) 2022-12-12 08:45:35 +01:00
test_creation.py Validate pos values when creating Doc (#9148) 2021-09-16 13:28:05 +02:00
test_doc_api.py Remove side effects from Doc.__init__() (#11506) 2022-09-26 15:58:21 +02:00
test_graph.py Tidy up and auto-format 2021-01-15 11:57:36 +11:00
test_json_doc_conversion.py Restore Doc attr getter values in Doc.to_json (#11700) 2022-11-03 11:49:08 +01:00
test_morphanalysis.py Add default option to MorphAnalysis.get (#12545) 2023-04-20 14:06:32 +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 Fix SpanGroup and Span typing (#12009) 2022-12-21 18:54:27 +01:00
test_span.py Fix Span.sents for edge case of Span being the only Span in the last sentence of a Doc. (#12484) 2023-03-29 18:54:47 +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