yongsun-yoon's picture
Update README.md
18f0476
metadata
language:
  - en
  - ko

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) # ์„ ๊ณ ๊ณตํŒ