Downloads · 30 days
12
1% of all-time downloads
yongsun-yoon/deberta-v3-base-open-ner
deberta-v3-base-open-ner is a token classification model from yongsun-yoon. Use it when you need labels on individual words, such as names. It is set up for transformers.
Downloads · 30 days
12
1% of all-time downloads
All-time downloads
1K
Public
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.bin735 MB · 99%
From the Hugging Face model README
You can read the details in this post.
from transformers import pipeline
nlp = pipeline('token-classification', 'yongsun-yoon/deberta-v3-base-open-ner', aggregation_strategy='simple')
text = 'Heat the olive oil in a frying pan, add the onion and cook for 5 minutes until softened and starting to turn golden. Set aside.'
entity_type = 'ingredient'
input_text = f'{text}{nlp.tokenizer.sep_token}{entity_type}' # [SEP]
nlp(input_text) # olive oil, onion