Update README.md
Browse files
README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2 |
|
3 |
kor-bert fine-tuning λͺ¨λΈ
|
4 |
|
|
|
|
|
|
|
5 |
ex) μλ
νμΈμ. μμ€μμ
λλ€. -> μλ
νμΈμ. ***μ
λλ€.
|
6 |
|
7 |
|
@@ -13,5 +16,18 @@ model_name = 'joon09/kor-naver-ner-name'
|
|
13 |
tokenizer = BertTokenizerFast.from_pretrained(model_name)
|
14 |
model = BertForTokenClassification.from_pretrained(model_name)
|
15 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
```
|
17 |
|
|
|
2 |
|
3 |
kor-bert fine-tuning λͺ¨λΈ
|
4 |
|
5 |
+
μμ£Ό μμ°λ νκΈμ΄λ¦ κΈ°μ€μΌλ‘
|
6 |
+
μμ±κΈ°λ₯Ό λ§λ€μ΄μ, 16λ§κ°μ νκΈ μ΄λ¦μ μμ± ν νμ΅ν λͺ¨λΈμ
λλ€.
|
7 |
+
|
8 |
ex) μλ
νμΈμ. μμ€μμ
λλ€. -> μλ
νμΈμ. ***μ
λλ€.
|
9 |
|
10 |
|
|
|
16 |
tokenizer = BertTokenizerFast.from_pretrained(model_name)
|
17 |
model = BertForTokenClassification.from_pretrained(model_name)
|
18 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
19 |
+
|
20 |
+
ner('μλ
νμΈμ. μμ€μμ
λλ€.',grouped_entities=True,aggregation_strategy='average')
|
21 |
+
|
22 |
+
[{'entity_group': 'PER',
|
23 |
+
'score': 0.99999785,
|
24 |
+
'word': 'μ',
|
25 |
+
'start': 7,
|
26 |
+
'end': 8},
|
27 |
+
{'entity_group': 'PER',
|
28 |
+
'score': 0.82035744,
|
29 |
+
'word': '##μ€μ',
|
30 |
+
'start': 8,
|
31 |
+
'end': 10}]
|
32 |
```
|
33 |
|