|
--- |
|
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) # μ κ³ κ³΅ν |
|
``` |