Reputation: 109
I'm creating a new label called GADGET to identify gadgets like Apple iPhone, Samsung TV etc. How do I add a custom description for the new label ?
For example, if label='ORG' & we give spacy.explain(label), it gives a description for ORG. How can I add similarly for a new label?
Upvotes: 0
Views: 125
Reputation: 1826
Go to the spacy model in your project and you can find glossary.py file spaCy/spacy/glossary.py
there You can define your label and save it. Then You can get explanation of your label using spacy.explain(label)
Upvotes: 1
Reputation: 111
You can update the spacy glossary file available in your site-packages path.
I hope this helps!
Upvotes: 0