Adding text categories to an existing model is not allowed?
See original GitHub issueI have a general question about text categorizing.
As far as I understand, it is not possible to add a new Category in an already existing model. If I load a ‘textcat’ pipe from an existing model, I am not allowed to add new categories. As a result the following code will not work:
nlp = spacy.load(modelPath)
textcat = nlp.get_pipe("textcat")
textcat.add_label("my_new_category")
Is this correct?
This implies that I have to know all categories for my model before I start the training for a new empty model.
This behaviour seems to be different to the Entity Recognition feature. When I get a ‘ner’ pipe from an existing model I can provide new entities and spyCy will refine the model.
I just ask this, because form the documentation and examples (which in general are really great!) this restriction is not clearly documented.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Add alternative text to a shape, picture, chart, SmartArt graphic ...
You can create alternative text (Alt Text) for shapes, pictures, charts, SmartArt graphics, or other objects in your Microsoft 365 document.
Read more >Models - Django documentation
Models ¶. A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the...
Read more >Content categories - HTML: HyperText Markup Language | MDN
Most HTML elements are a member of one or more content categories — these categories group elements that share common characteristics.
Read more >Edit document structure with the Content and Tags panels ...
Options allow you to search the page or document, and to add tags to ... The standard Adobe element tag types are available...
Read more >Create and use variants - Figma Help Center
Note: Component sets can only contain components, so it's not possible to add text or annotations, nest frames, or group a subset of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s right, you can’t add new labels to an existing textcat model in v2. (You will be able to to in v3, though!)
It depends on the component (you also can’t add labels to a tagger) and you’re right that this isn’t clearly documented.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.