From 61f5c007a08ba9089ae071cf1f76e7b7b0a77b17 Mon Sep 17 00:00:00 2001 From: Christos Aridas Date: Fri, 23 Aug 2019 20:15:32 +0300 Subject: [PATCH] DOC Fix pipeline functions examples (#4189) --- website/docs/api/pipeline-functions.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/docs/api/pipeline-functions.md b/website/docs/api/pipeline-functions.md index 9059491a1..63b3cd164 100644 --- a/website/docs/api/pipeline-functions.md +++ b/website/docs/api/pipeline-functions.md @@ -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"] > ```