spaCy/website/api
Matthew Honnibal 63b7accd74
💫 Make span.as_doc() return a copy, not a view. Closes #1537 (#3107)
Initially span.as_doc() was designed to return a view of the span's contents, as a Doc object. This was a nice idea, but it fails due to the token.idx property, which refers to the character offset within the string. In a span, the idx of the first token might not be 0. Because this data is different, we can't have a view --- it'll be inconsistent.

This patch changes span.as_doc() to instead return a copy. The docs are updated accordingly. Closes #1537

* Update test for span.as_doc()

* Make span.as_doc() return a copy. Closes #1537

* Document change to Span.as_doc()
2018-12-30 15:17:46 +01:00
..
_annotation OntoNotes url fix (#2981) 2018-11-29 19:34:30 +01:00
_cython 💫 Document Cython API (#2433) 2018-06-11 17:47:46 +02:00
_top-level Small fixes to displaCy (#3076) 2018-12-20 17:32:04 +01:00
_data.json 💫 Document Cython API (#2433) 2018-06-11 17:47:46 +02:00
annotation.jade Update and simplify other annotation scheme data 2017-11-05 16:09:48 +01:00
cli.jade Merge branch 'master' into develop 2018-12-18 13:48:10 +01:00
cython-classes.jade 💫 Document Cython API (#2433) 2018-06-11 17:47:46 +02:00
cython-structs.jade 💫 Document Cython API (#2433) 2018-06-11 17:47:46 +02:00
cython.jade 💫 Document Cython API (#2433) 2018-06-11 17:47:46 +02:00
dependencyparser.jade Add notes on pipe template inheritance in docs 2017-10-26 12:57:32 +02:00
doc.jade 💫 Port master changes over to develop (#2979) 2018-11-29 16:30:29 +01:00
entityrecognizer.jade Add notes on pipe template inheritance in docs 2017-10-26 12:57:32 +02:00
goldcorpus.jade Improve label management in parser and NER (#2108) 2018-03-19 02:58:08 +01:00
goldparse.jade Update goldparse.jade 2018-01-03 17:25:21 +05:30
index.jade 💫 Document Cython API (#2433) 2018-06-11 17:47:46 +02:00
language.jade 💫 Port master changes over to develop (#2979) 2018-11-29 16:30:29 +01:00
lemmatizer.jade Document lemmatizer 2017-10-24 16:00:56 +02:00
lexeme.jade 💫 Port master changes over to develop (#2979) 2018-11-29 16:30:29 +01:00
matcher.jade Add v2.1 tag to new arguments [ci skip] 2018-02-18 14:15:18 +01:00
phrasematcher.jade Fixes typo in PhraseMatcher API docs 2018-01-11 17:35:59 +01:00
pipe.jade drop should be a float 2018-03-21 23:16:56 +11:00
span.jade 💫 Make span.as_doc() return a copy, not a view. Closes #1537 (#3107) 2018-12-30 15:17:46 +01:00
stringstore.jade Update API documentation 2017-10-03 14:27:22 +02:00
tagger.jade Add notes on pipe template inheritance in docs 2017-10-26 12:57:32 +02:00
textcategorizer.jade Don't document the tensorizer for now 2017-11-01 19:49:04 +01:00
token.jade Fix is_ascii documentation and create contributor file (#2988) 2018-11-30 15:57:58 +01:00
tokenizer.jade Update API documentation 2017-10-03 14:27:22 +02:00
top-level.jade Move CLI docs to own page 2017-10-30 19:39:26 +01:00
vectors.jade Document Vectors.resize() and update v2 incompatibilities (resolves #1514) 2017-11-08 17:11:11 +01:00
vocab.jade Change clear_vectors to reset_vectors (resolves #1516) 2017-11-08 18:11:23 +01:00