diff --git a/website/api/_top-level/_displacy.jade b/website/api/_top-level/_displacy.jade index 105bb0cc6..e6443cea8 100644 --- a/website/api/_top-level/_displacy.jade +++ b/website/api/_top-level/_displacy.jade @@ -25,7 +25,7 @@ p +table(["Name", "Type", "Description", "Default"]) +row +cell #[code docs] - +cell list or #[code Doc] + +cell list, #[code Doc], #[code Span] +cell Document(s) to visualize. +cell @@ -84,7 +84,7 @@ p Render a dependency parse tree or named entity visualization. +table(["Name", "Type", "Description", "Default"]) +row +cell #[code docs] - +cell list or #[code Doc] + +cell list, #[code Doc], #[code Span] +cell Document(s) to visualize. +cell @@ -157,6 +157,12 @@ p | as it prevents long arcs to attach punctuation. +cell #[code True] + +row + +cell #[code collapse_phrases] + +cell bool + +cell Merge noun phrases into one token. + +cell #[code False] + +row +cell #[code compact] +cell bool diff --git a/website/api/cli.jade b/website/api/cli.jade index c941c7dda..760f34a4b 100644 --- a/website/api/cli.jade +++ b/website/api/cli.jade @@ -136,6 +136,12 @@ p +cell flag +cell Print information as Markdown. + +row + +cell #[code --silent], #[code -s] + +tag-new("2.0.12") + +cell flag + +cell Don't print anything, just return the values. + +row +cell #[code --help], #[code -h] +cell flag diff --git a/website/api/doc.jade b/website/api/doc.jade index 5a4d39057..c3f152fac 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 @@ -241,6 +241,31 @@ p Check whether an extension has been registered on the #[code Doc] class. +cell bool +cell Whether the extension has been registered. ++h(2, "remove_extension") Doc.remove_extension + +tag classmethod + +tag-new("2.0.12") + +p Remove a previously registered extension. + ++aside-code("Example"). + from spacy.tokens import Doc + Doc.set_extension('has_city', default=False) + removed = Doc.remove_extension('has_city') + assert not Doc.has_extension('has_city') + ++table(["Name", "Type", "Description"]) + +row + +cell #[code name] + +cell unicode + +cell Name of the extension. + + +row("foot") + +cell returns + +cell tuple + +cell + | A #[code.u-break (default, method, getter, setter)] tuple of the + | removed extension. + +h(2, "char_span") Doc.char_span +tag method +tag-new(2) @@ -761,6 +786,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 diff --git a/website/api/span.jade b/website/api/span.jade index c4d49305f..681664269 100644 --- a/website/api/span.jade +++ b/website/api/span.jade @@ -219,6 +219,31 @@ p Check whether an extension has been registered on the #[code Span] class. +cell bool +cell Whether the extension has been registered. ++h(2, "remove_extension") Span.remove_extension + +tag classmethod + +tag-new("2.0.12") + +p Remove a previously registered extension. + ++aside-code("Example"). + from spacy.tokens import Span + Span.set_extension('is_city', default=False) + removed = Span.remove_extension('is_city') + assert not Span.has_extension('is_city') + ++table(["Name", "Type", "Description"]) + +row + +cell #[code name] + +cell unicode + +cell Name of the extension. + + +row("foot") + +cell returns + +cell tuple + +cell + | A #[code.u-break (default, method, getter, setter)] tuple of the + | removed extension. + +h(2, "similarity") Span.similarity +tag method +tag-model("vectors") diff --git a/website/api/token.jade b/website/api/token.jade index 924336481..7db4f350c 100644 --- a/website/api/token.jade +++ b/website/api/token.jade @@ -154,6 +154,31 @@ p Check whether an extension has been registered on the #[code Token] class. +cell bool +cell Whether the extension has been registered. ++h(2, "remove_extension") Token.remove_extension + +tag classmethod + +tag-new("2.0.11") + +p Remove a previously registered extension. + ++aside-code("Example"). + from spacy.tokens import Token + Token.set_extension('is_fruit', default=False) + removed = Token.remove_extension('is_fruit') + assert not Token.has_extension('is_fruit') + ++table(["Name", "Type", "Description"]) + +row + +cell #[code name] + +cell unicode + +cell Name of the extension. + + +row("foot") + +cell returns + +cell tuple + +cell + | A #[code.u-break (default, method, getter, setter)] tuple of the + | removed extension. + +h(2, "check_flag") Token.check_flag +tag method @@ -484,6 +509,17 @@ p The L2 norm of the token's vector representation. +h(2, "attributes") Attributes +table(["Name", "Type", "Description"]) + +row + +cell #[code doc] + +cell #[code Doc] + +cell The parent document. + + +row + +cell #[code sent] + +tag-new("2.0.12") + +cell #[code Span] + +cell The sentence span that this token is a part of. + +row +cell #[code text] +cell unicode diff --git a/website/models/_data.json b/website/models/_data.json index 06164d299..2b791ac0e 100644 --- a/website/models/_data.json +++ b/website/models/_data.json @@ -76,6 +76,7 @@ }, "MODEL_LICENSES": { + "MIT": "https://opensource.org/licenses/MIT", "CC BY 4.0": "https://creativecommons.org/licenses/by/4.0/", "CC BY-SA": "https://creativecommons.org/licenses/by-sa/3.0/", "CC BY-SA 3.0": "https://creativecommons.org/licenses/by-sa/3.0/", @@ -115,8 +116,12 @@ "ro": "Romanian", "hr": "Croatian", "tr": "Turkish", + "el": "Greek", "he": "Hebrew", + "ar": "Arabic", "fa": "Persian", + "ur": "Urdu", + "tt": "Tatar", "ga": "Irish", "bn": "Bengali", "hi": "Hindi", diff --git a/website/usage/_models/_languages.jade b/website/usage/_models/_languages.jade index 7ab985b97..71d00e0a6 100644 --- a/website/usage/_models/_languages.jade +++ b/website/usage/_models/_languages.jade @@ -44,7 +44,7 @@ p +list.o-no-block +item #[strong Chinese]: #[+a("https://github.com/fxsjy/jieba") Jieba] - +item #[strong Japanese]: #[+a("https://github.com/mocobeta/janome") Janome] + +item #[strong Japanese]: #[+a("https://github.com/taku910/mecab") MeCab] +item #[strong Thai]: #[+a("https://github.com/wannaphongcom/pythainlp") pythainlp] +item #[strong Vietnamese]: #[+a("https://github.com/trungtv/pyvi") Pyvi] +item #[strong Russian]: #[+a("https://github.com/kmike/pymorphy2") pymorphy2]