spaCy/website/docs
langdonholmes cef9f25ec0 Update processing-pipelines.md to mention method for doc metadata (#7480)
* Update processing-pipelines.md

Under "things to try," inform users they can save metadata when using nlp.pipe(foobar, as_tuples=True)

Link to a new example on the attributes page detailing the following:

> ```
> data = [
>   ("Some text to process", {"meta": "foo"}),
>   ("And more text...", {"meta": "bar"})
> ]
> 
> for doc, context in nlp.pipe(data, as_tuples=True):
>     # Let's assume you have a "meta" extension registered on the Doc
>     doc._.meta = context["meta"]
> ```

from https://stackoverflow.com/questions/57058798/make-spacy-nlp-pipe-process-tuples-of-text-and-additional-information-to-add-as

* Updating the attributes section

Update the attributes section with example of how extensions can be used to store metadata.

* Update processing-pipelines.md

* Update processing-pipelines.md

Made as_tuples example executable and relocated to the end of the "Processing Text" section.

* Update processing-pipelines.md

* Update processing-pipelines.md

Removed extra line

* Reformat and rephrase

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2021-04-19 12:00:45 +02:00
..
api Fix formatting [ci skip] 2021-04-06 14:13:36 +10:00
images Update pipeline design docs [ci skip] 2021-04-06 14:13:43 +10:00
models Add more link anchors [ci skip] 2021-04-06 14:15:29 +10:00
usage Update processing-pipelines.md to mention method for doc metadata (#7480) 2021-04-19 12:00:45 +02:00
index.md 💫 Update website (#3285) 2019-02-17 19:31:19 +01:00
styleguide.md Update styleguide [ci skip] 2020-09-14 11:25:57 +02:00