Open Named Entity Recognition (Multilingual)
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 = '30일 전주지법 군산지원 제1형사부는 박 시장에 대한 선고공판에서 벌금 500만원을 선고했다.'
entity_type = 'event'
input_text = f'{text}{nlp.tokenizer.sep_token}{entity_type}' # [SEP]
nlp(input_text) # 선고공판