DOC Fix pipeline functions examples (#4189)

This commit is contained in:
Christos Aridas 2019-08-23 20:15:32 +03:00 committed by Ines Montani
parent bb911e5f4e
commit 61f5c007a0
1 changed files with 6 additions and 6 deletions

View File

@ -17,13 +17,13 @@ the processing pipeline using [`nlp.add_pipe`](/api/language#add_pipe).
> #### Example
>
> ```python
> texts = [t.token for t in nlp(u"I have a blue car")]
> assert texts = ["I", "have", "a", "blue", "car"]
> texts = [t.text for t in nlp(u"I have a blue car")]
> assert texts == ["I", "have", "a", "blue", "car"]
>
> merge_nps = nlp.create_pipe("merge_noun_chunks")
> nlp.add_pipe(merge_nps)
>
> texts = [t.token for t in nlp(u"I have a blue car")]
> texts = [t.text for t in nlp(u"I have a blue car")]
> assert texts == ["I", "have", "a blue car"]
> ```
@ -50,13 +50,13 @@ the processing pipeline using [`nlp.add_pipe`](/api/language#add_pipe).
> #### Example
>
> ```python
> texts = [t.token for t in nlp(u"I like David Bowie")]
> assert texts = ["I", "like", "David", "Bowie"]
> texts = [t.text for t in nlp(u"I like David Bowie")]
> assert texts == ["I", "like", "David", "Bowie"]
>
> merge_ents = nlp.create_pipe("merge_entities")
> nlp.add_pipe(merge_ents)
>
> texts = [t.token for t in nlp(u"I like David Bowie")]
> texts = [t.text for t in nlp(u"I like David Bowie")]
> assert texts == ["I", "like", "David Bowie"]
> ```