Views
No views yet
This model is a fine-tuned derivative ofklue/roberta-small. Since the base model does not currently specify a license, no license is specified for this derivative model at this time.
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|---|---|---|---|---|---|---|---|
| No log | 1.0 | 61 | 0.0128 | 0.9871 | 0.9929 | 0.9900 | 0.9979 |
| No log | 2.0 | 122 | 0.0098 | 0.9895 | 0.9976 | 0.9935 | 0.9987 |
| No log | 3.0 | 183 | 0.0082 | 0.9930 | 0.9988 | 0.9959 | 0.9988 |
1from transformers import AutoTokenizer, AutoModelForTokenClassification
2from transformers import pipeline
3
4tokenizer = AutoTokenizer.from_pretrained("vitus9988/klue-roberta-small-ner-identified")
5model = AutoModelForTokenClassification.from_pretrained("vitus9988/klue-roberta-small-ner-identified")
6
7nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
8example = """
9저는 김철수입니다. 집은 서울특별시 강남대로이고 전화번호는 010-1234-5678, 주민등록번호는 123456-1234567입니다. 메일주소는 hugging@face.com입니다. 저는 10월 25일에 출국할 예정입니다.
10"""
11
12ner_results = nlp(example)
13for i in ner_results:
14 print(i)
15
16#{'entity_group': 'PS', 'score': 0.9617835, 'word': '김철수', 'start': 3, 'end': 6}
17#{'entity_group': 'AD', 'score': 0.9839702, 'word': '서울특별시 강남대로', 'start': 14, 'end': 24}
18#{'entity_group': 'PH', 'score': 0.9906756, 'word': '010 - 1234 - 5678', 'start': 33, 'end': 46}
19#{'entity_group': 'RN', 'score': 0.9904553, 'word': '123456 - 1234567', 'start': 56, 'end': 70}
20#{'entity_group': 'EM', 'score': 0.99022245, 'word': 'hugging @ face. com', 'start': 81, 'end': 97}
21#{'entity_group': 'DT', 'score': 0.985629, 'word': '10월 25일', 'start': 105, 'end': 112}
22