mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Update formatting of deprecation note
This commit is contained in:
parent
a7bf38bf31
commit
9e429b5a8a
|
@ -58,7 +58,6 @@ p
|
||||||
nlp.from_disk(model_data_path) # load in model data
|
nlp.from_disk(model_data_path) # load in model data
|
||||||
|
|
||||||
+infobox("Deprecation note", "⚠️")
|
+infobox("Deprecation note", "⚠️")
|
||||||
.o-block
|
|
||||||
| As of spaCy 2.0, the #[code path] keyword argument is deprecated. spaCy
|
| 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
|
| 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,
|
| return an empty #[code Language] object. If you need a blank language,
|
||||||
|
@ -66,6 +65,7 @@ p
|
||||||
| or import the class explicitly, e.g.
|
| or import the class explicitly, e.g.
|
||||||
| #[code from spacy.lang.en import English].
|
| #[code from spacy.lang.en import English].
|
||||||
|
|
||||||
|
+code-wrapper
|
||||||
+code-new nlp = spacy.load('/model')
|
+code-new nlp = spacy.load('/model')
|
||||||
+code-old nlp = spacy.load('en', path='/model')
|
+code-old nlp = spacy.load('en', path='/model')
|
||||||
|
|
||||||
|
|
|
@ -84,11 +84,11 @@ p
|
||||||
+cell A container for accessing the annotations.
|
+cell A container for accessing the annotations.
|
||||||
|
|
||||||
+infobox("Deprecation note", "⚠️")
|
+infobox("Deprecation note", "⚠️")
|
||||||
.o-block
|
|
||||||
| Pipeline components to prevent from being loaded can now be added as
|
| Pipeline components to prevent from being loaded can now be added as
|
||||||
| a list to #[code disable], instead of specifying one keyword argument
|
| a list to #[code disable], instead of specifying one keyword argument
|
||||||
| per component.
|
| per component.
|
||||||
|
|
||||||
|
+code-wrapper
|
||||||
+code-new doc = nlp(u"I don't want parsed", disable=['parser'])
|
+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-old doc = nlp(u"I don't want parsed", parse=False)
|
||||||
|
|
||||||
|
@ -533,13 +533,13 @@ p
|
||||||
+cell The modified #[code Language] object.
|
+cell The modified #[code Language] object.
|
||||||
|
|
||||||
+infobox("Deprecation note", "⚠️")
|
+infobox("Deprecation note", "⚠️")
|
||||||
.o-block
|
|
||||||
| As of spaCy v2.0, the #[code save_to_directory] method has been
|
| As of spaCy v2.0, the #[code save_to_directory] method has been
|
||||||
| renamed to #[code to_disk], to improve consistency across classes.
|
| renamed to #[code to_disk], to improve consistency across classes.
|
||||||
| Pipeline components to prevent from being loaded can now be added as
|
| Pipeline components to prevent from being loaded can now be added as
|
||||||
| a list to #[code disable], instead of specifying one keyword argument
|
| a list to #[code disable], instead of specifying one keyword argument
|
||||||
| per component.
|
| per component.
|
||||||
|
|
||||||
|
+code-wrapper
|
||||||
+code-new nlp = English().from_disk(disable=['tagger', 'ner'])
|
+code-new nlp = English().from_disk(disable=['tagger', 'ner'])
|
||||||
+code-old nlp = spacy.load('en', tagger=False, entity=False)
|
+code-old nlp = spacy.load('en', tagger=False, entity=False)
|
||||||
|
|
||||||
|
@ -595,11 +595,11 @@ p Load state from a binary string.
|
||||||
+cell The #[code Language] object.
|
+cell The #[code Language] object.
|
||||||
|
|
||||||
+infobox("Deprecation note", "⚠️")
|
+infobox("Deprecation note", "⚠️")
|
||||||
.o-block
|
|
||||||
| Pipeline components to prevent from being loaded can now be added as
|
| Pipeline components to prevent from being loaded can now be added as
|
||||||
| a list to #[code disable], instead of specifying one keyword argument
|
| a list to #[code disable], instead of specifying one keyword argument
|
||||||
| per component.
|
| per component.
|
||||||
|
|
||||||
|
+code-wrapper
|
||||||
+code-new nlp = English().from_bytes(bytes, disable=['tagger', 'ner'])
|
+code-new nlp = English().from_bytes(bytes, disable=['tagger', 'ner'])
|
||||||
+code-old nlp = English().from_bytes('en', tagger=False, entity=False)
|
+code-old nlp = English().from_bytes('en', tagger=False, entity=False)
|
||||||
|
|
||||||
|
|
|
@ -203,12 +203,12 @@ p
|
||||||
| dict describes a token.
|
| dict describes a token.
|
||||||
|
|
||||||
+infobox("Deprecation note", "⚠️")
|
+infobox("Deprecation note", "⚠️")
|
||||||
.o-block
|
|
||||||
| As of spaCy 2.0, #[code Matcher.add_pattern] and #[code Matcher.add_entity]
|
| As of spaCy 2.0, #[code Matcher.add_pattern] and #[code Matcher.add_entity]
|
||||||
| are deprecated and have been replaced with a simpler
|
| are deprecated and have been replaced with a simpler
|
||||||
| #[+api("matcher#add") #[code Matcher.add]] that lets you add a list of
|
| #[+api("matcher#add") #[code Matcher.add]] that lets you add a list of
|
||||||
| patterns and a callback for a given match ID.
|
| patterns and a callback for a given match ID.
|
||||||
|
|
||||||
|
+code-wrapper
|
||||||
+code-new.
|
+code-new.
|
||||||
matcher.add('GoogleNow', merge_phrases, [{ORTH: 'Google'}, {ORTH: 'Now'}])
|
matcher.add('GoogleNow', merge_phrases, [{ORTH: 'Google'}, {ORTH: 'Now'}])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user