spaCy/spacy/tokens
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__.pxd
__init__.py
_dict_proxies.py
_retokenize.pyi
_retokenize.pyx
_serialize.py Add Span.kb_id/Span.id strings to Doc/DocBin serialization if set (#12493) 2023-04-03 15:11:12 +02:00
doc.pxd
doc.pyi Add span_id to Span.char_span, update Doc/Span.char_span docs (#12196) 2023-01-27 15:09:17 +01:00
doc.pyx Add Span.kb_id/Span.id strings to Doc/DocBin serialization if set (#12493) 2023-04-03 15:11:12 +02:00
graph.pxd
graph.pyx
morphanalysis.pxd
morphanalysis.pyi Add default option to MorphAnalysis.get (#12545) 2023-04-20 14:06:32 +02:00
morphanalysis.pyx Add default option to MorphAnalysis.get (#12545) 2023-04-20 14:06:32 +02:00
span_group.pxd
span_group.pyi Fix SpanGroup and Span typing (#12009) 2022-12-21 18:54:27 +01:00
span_group.pyx Fix SpanGroup and Span typing (#12009) 2022-12-21 18:54:27 +01:00
span.pxd
span.pyi Add span_id to Span.char_span, update Doc/Span.char_span docs (#12196) 2023-01-27 15:09:17 +01:00
span.pyx 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
token.pxd
token.pyi
token.pyx
underscore.py