spaCy/spacy/tokens
Ines Montani 0426689db8 💫 Improve Doc.to_json and add Doc.is_nered (#3381)
* Use default return instead of else

* Add Doc.is_nered to indicate if entities have been set

* Add properties in Doc.to_json if they were set, not if they're available

This way, if a processed Doc exports "pos": None, it means that the tag was explicitly unset. If it exports "ents": [], it means that entity annotations are available but that this document doesn't contain any entities. Before, this would have been unclear and problematic for training.
2019-03-10 15:24:34 +01: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 Tidy up and improve docs and docstrings (#3370) 2019-03-08 11:42:26 +01:00
_retokenize.pyx Tidy up and improve docs and docstrings (#3370) 2019-03-08 11:42:26 +01:00
_serialize.py Tidy up and improve docs and docstrings (#3370) 2019-03-08 11:42:26 +01:00
doc.pxd Fix issue 2396 (#3089) 2018-12-29 18:05:52 +01:00
doc.pyx 💫 Improve Doc.to_json and add Doc.is_nered (#3381) 2019-03-10 15:24:34 +01:00
span.pxd Add Span.to_array method 2017-08-19 12:20:45 +02:00
span.pyx Tidy up and improve docs and docstrings (#3370) 2019-03-08 11:42:26 +01:00
token.pxd Make NORM a token attribute (#3029) 2018-12-08 10:49:10 +01:00
token.pyx Tidy up and improve docs and docstrings (#3370) 2019-03-08 11:42:26 +01:00
underscore.py 💫 Allow setting of custom attributes during retokenization (closes #3314) (#3324) 2019-02-24 18:38:47 +01:00