mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +03:00
Add text classification to v2 overview
This commit is contained in:
parent
f085b88f9d
commit
ab8ffbaab7
|
@ -38,6 +38,7 @@ p
|
|||
+item #[+a("#summary") Summary]
|
||||
+item #[+a("#features") New features]
|
||||
+item #[+a("#features-pipelines") Improved processing pipelines]
|
||||
+item #[+a("#features-text-classification") Text classification]
|
||||
+item #[+a("#features-hash-ids") Hash values instead of integer IDs]
|
||||
+item #[+a("#features-serializer") Saving, loading and serialization]
|
||||
+item #[+a("#features-displacy") displaCy visualizer]
|
||||
|
@ -102,6 +103,26 @@ p
|
|||
| #[strong API:] #[+api("language") #[code Language]]
|
||||
| #[strong Usage:] #[+a("/docs/usage/language-processing-pipeline") Processing text]
|
||||
|
||||
+h(3, "features-text-classification") Text classification
|
||||
|
||||
+aside-code("Example").
|
||||
from spacy.lang.en import English
|
||||
nlp = English(pipeline=['tensorizer', 'tagger', 'textcat'])
|
||||
|
||||
p
|
||||
| spaCy v2.0 lets you add text categorization models to spaCy pipelines.
|
||||
| The model supports classification with multiple, non-mutually exclusive
|
||||
| labels – so multiple labels can apply at once. You can change the model
|
||||
| architecture rather easily, but by default, the #[code TextCategorizer]
|
||||
| class uses a convolutional neural network to assign position-sensitive
|
||||
| vectors to each word in the document.
|
||||
|
||||
+infobox
|
||||
| #[strong API:] #[+api("textcategorizer") #[code TextCategorizer]],
|
||||
| #[+api("doc#attributes") #[code Doc.cats]],
|
||||
| #[+api("goldparse#attributes") #[code GoldParse.cats]]#[br]
|
||||
| #[strong Usage:] #[+a("/docs/usage/text-classification") Text classification]
|
||||
|
||||
+h(3, "features-hash-ids") Hash values instead of integer IDs
|
||||
|
||||
+aside-code("Example").
|
||||
|
|
Loading…
Reference in New Issue
Block a user