yongsun-yoon's picture
Update README.md
18f0476
|
raw
history blame
630 Bytes
---
language:
- en
- ko
---
# Open Named Entity Recognition (Multilingual)
You can read the details in [this post](https://medium.com/@yongsun.yoon/cross-encoder-for-open-named-entity-recognition-4a7d485c37cc).
```python
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) # μ„ κ³ κ³΅νŒ
```