yongsun-yoon
commited on
Commit
โข
a1677b7
1
Parent(s):
41de239
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# Open Named Entity Recognition (Multilingual)
|
3 |
+
|
4 |
+
```python
|
5 |
+
from transformers import pipeline
|
6 |
+
|
7 |
+
nlp = pipeline('token-classification', 'yongsun-yoon/deberta-v3-base-open-ner', aggregation_strategy='simple')
|
8 |
+
|
9 |
+
text = '30์ผ ์ ์ฃผ์ง๋ฒ ๊ตฐ์ฐ์ง์ ์ 1ํ์ฌ๋ถ๋ ๋ฐ ์์ฅ์ ๋ํ ์ ๊ณ ๊ณตํ์์ ๋ฒ๊ธ 500๋ง์์ ์ ๊ณ ํ๋ค.'
|
10 |
+
entity_type = 'event'
|
11 |
+
input_text = f'{text}{nlp.tokenizer.sep_token}{entity_type}' # [SEP]
|
12 |
+
|
13 |
+
nlp(input_text) # ์ ๊ณ ๊ณตํ
|
14 |
+
```
|