Custom model architecture with non-text inputs #10050
Replies: 1 comment 1 reply
-
This is easier in v3.2 now that you can pass in doc = nlp.make_doc(text)
doc._.ext1 = value1
doc._.ext2 = value2
doc = nlp(doc) Where If you want to train components using custom extensions as features, you can include custom extension values in the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use case whereby I want to classify a piece of text and I have some relevant metadata (numeric and categorical) that I would like to incorporate into my model. We already use spaCy for rules based NER and text classification, which has made building our system a joy! I want to implement a custom model that allows me to include text and metadata while keeping it within the
Language
object. Are there any examples of this being done before? Ultimately, I need to be able to updatedoc.cats
or a custom attribute likedoc._.cats
. We have our training pipeline in a spaCy project already, so I am looking for a solution played nice with that as well. I've been searching high and low for examples but haven't managed to find any.Beta Was this translation helpful? Give feedback.
All reactions