From 153f41a5cc5a5218ef82f7d43d7b4e789f6beeda Mon Sep 17 00:00:00 2001 From: ines Date: Sat, 21 Jul 2018 15:51:11 +0200 Subject: [PATCH] Use better examples for Doc extension methods --- website/api/doc.jade | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/website/api/doc.jade b/website/api/doc.jade index 5a4d39057..8732ae024 100644 --- a/website/api/doc.jade +++ b/website/api/doc.jade @@ -202,8 +202,8 @@ p +aside-code("Example"). from spacy.tokens import Doc - Doc.set_extension('is_city', default=False) - extension = Doc.get_extension('is_city') + Doc.set_extension('has_city', default=False) + extension = Doc.get_extension('has_city') assert extension == (False, None, None, None) +table(["Name", "Type", "Description"]) @@ -227,8 +227,8 @@ p Check whether an extension has been registered on the #[code Doc] class. +aside-code("Example"). from spacy.tokens import Doc - Doc.set_extension('is_city', default=False) - assert Doc.has_extension('is_city') + Doc.set_extension('has_city', default=False) + assert Doc.has_extension('has_city') +table(["Name", "Type", "Description"]) +row @@ -761,6 +761,13 @@ p +cell bool +cell A flag indicating that the document has been syntactically parsed. + +row + +cell #[code is_sentenced] + +cell bool + +cell + | A flag indicating that sentence boundaries have been applied to + | the document. + +row +cell #[code sentiment] +cell float