diff --git a/website/api/_top-level/_spacy.jade b/website/api/_top-level/_spacy.jade index c6b342011..4b21bd78f 100644 --- a/website/api/_top-level/_spacy.jade +++ b/website/api/_top-level/_spacy.jade @@ -58,16 +58,16 @@ p nlp.from_disk(model_data_path) # load in model data +infobox("Deprecation note", "⚠️") - .o-block - | As of spaCy 2.0, the #[code path] keyword argument is deprecated. spaCy - | will also raise an error if no model could be loaded and never just - | return an empty #[code Language] object. If you need a blank language, - | you can use the new function #[+api("spacy#blank") #[code spacy.blank()]] - | or import the class explicitly, e.g. - | #[code from spacy.lang.en import English]. + | As of spaCy 2.0, the #[code path] keyword argument is deprecated. spaCy + | will also raise an error if no model could be loaded and never just + | return an empty #[code Language] object. If you need a blank language, + | you can use the new function #[+api("spacy#blank") #[code spacy.blank()]] + | or import the class explicitly, e.g. + | #[code from spacy.lang.en import English]. - +code-new nlp = spacy.load('/model') - +code-old nlp = spacy.load('en', path='/model') + +code-wrapper + +code-new nlp = spacy.load('/model') + +code-old nlp = spacy.load('en', path='/model') +h(3, "spacy.blank") spacy.blank +tag function diff --git a/website/api/language.jade b/website/api/language.jade index f86257f38..1bc9b601f 100644 --- a/website/api/language.jade +++ b/website/api/language.jade @@ -84,13 +84,13 @@ p +cell A container for accessing the annotations. +infobox("Deprecation note", "⚠️") - .o-block - | Pipeline components to prevent from being loaded can now be added as - | a list to #[code disable], instead of specifying one keyword argument - | per component. + | Pipeline components to prevent from being loaded can now be added as + | a list to #[code disable], instead of specifying one keyword argument + | per component. - +code-new doc = nlp(u"I don't want parsed", disable=['parser']) - +code-old doc = nlp(u"I don't want parsed", parse=False) + +code-wrapper + +code-new doc = nlp(u"I don't want parsed", disable=['parser']) + +code-old doc = nlp(u"I don't want parsed", parse=False) +h(2, "pipe") Language.pipe +tag method @@ -533,15 +533,15 @@ p +cell The modified #[code Language] object. +infobox("Deprecation note", "⚠️") - .o-block - | As of spaCy v2.0, the #[code save_to_directory] method has been - | renamed to #[code to_disk], to improve consistency across classes. - | Pipeline components to prevent from being loaded can now be added as - | a list to #[code disable], instead of specifying one keyword argument - | per component. + | As of spaCy v2.0, the #[code save_to_directory] method has been + | renamed to #[code to_disk], to improve consistency across classes. + | Pipeline components to prevent from being loaded can now be added as + | a list to #[code disable], instead of specifying one keyword argument + | per component. - +code-new nlp = English().from_disk(disable=['tagger', 'ner']) - +code-old nlp = spacy.load('en', tagger=False, entity=False) + +code-wrapper + +code-new nlp = English().from_disk(disable=['tagger', 'ner']) + +code-old nlp = spacy.load('en', tagger=False, entity=False) +h(2, "to_bytes") Language.to_bytes +tag method @@ -595,13 +595,13 @@ p Load state from a binary string. +cell The #[code Language] object. +infobox("Deprecation note", "⚠️") - .o-block - | Pipeline components to prevent from being loaded can now be added as - | a list to #[code disable], instead of specifying one keyword argument - | per component. + | Pipeline components to prevent from being loaded can now be added as + | a list to #[code disable], instead of specifying one keyword argument + | per component. - +code-new nlp = English().from_bytes(bytes, disable=['tagger', 'ner']) - +code-old nlp = English().from_bytes('en', tagger=False, entity=False) + +code-wrapper + +code-new nlp = English().from_bytes(bytes, disable=['tagger', 'ner']) + +code-old nlp = English().from_bytes('en', tagger=False, entity=False) +h(2, "attributes") Attributes diff --git a/website/api/matcher.jade b/website/api/matcher.jade index 35aba4cba..097ac7008 100644 --- a/website/api/matcher.jade +++ b/website/api/matcher.jade @@ -203,18 +203,18 @@ p | dict describes a token. +infobox("Deprecation note", "⚠️") - .o-block - | As of spaCy 2.0, #[code Matcher.add_pattern] and #[code Matcher.add_entity] - | are deprecated and have been replaced with a simpler - | #[+api("matcher#add") #[code Matcher.add]] that lets you add a list of - | patterns and a callback for a given match ID. + | As of spaCy 2.0, #[code Matcher.add_pattern] and #[code Matcher.add_entity] + | are deprecated and have been replaced with a simpler + | #[+api("matcher#add") #[code Matcher.add]] that lets you add a list of + | patterns and a callback for a given match ID. - +code-new. - matcher.add('GoogleNow', merge_phrases, [{ORTH: 'Google'}, {ORTH: 'Now'}]) + +code-wrapper + +code-new. + matcher.add('GoogleNow', merge_phrases, [{ORTH: 'Google'}, {ORTH: 'Now'}]) - +code-old. - matcher.add_entity('GoogleNow', on_match=merge_phrases) - matcher.add_pattern('GoogleNow', [{ORTH: 'Google'}, {ORTH: 'Now'}]) + +code-old. + matcher.add_entity('GoogleNow', on_match=merge_phrases) + matcher.add_pattern('GoogleNow', [{ORTH: 'Google'}, {ORTH: 'Now'}]) +h(2, "remove") Matcher.remove +tag method