File size: 2,887 Bytes
83dbc58
943c8c2
 
 
83dbc58
943c8c2
 
 
83dbc58
 
 
 
 
 
 
 
d4610cf
83dbc58
42bfd3a
943c8c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83dbc58
 
 
 
943c8c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83dbc58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---

widget:
- text: "Liên quan vụ việc CSGT bị tố đánh dân, trúng một cháu nhỏ đang ngủ, đang lan truyền trên mạng xã hội, Đại tá Nguyễn Văn Tảo, Phó Giám đốc Công an tỉnh Tiền Giang vừa có cuộc họp cùng Chỉ huy Công an huyện Châu Thành và một số đơn vị nghiệp vụ cấp tỉnh để chỉ đạo làm rõ thông tin."
tags:
- named-entity-recognition
language:
- vi
model-index:
- name: ner-vietnamese-electra-base
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# vietnamese-ner

This model is a fine-tuned version of [NlpHUST/electra-base-vn](https://huggingface.co/NlpHUST/electra-base-vn) on an VLSP 2018 dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0580
- Location Precision: 0.9353
- Location Recall: 0.9377
- Location F1: 0.9365
- Location Number: 2360
- Miscellaneous Precision: 0.5660
- Miscellaneous Recall: 0.6897
- Miscellaneous F1: 0.6218
- Miscellaneous Number: 174
- Organization Precision: 0.8610
- Organization Recall: 0.9068
- Organization F1: 0.8833
- Organization Number: 1878
- Person Precision: 0.9692
- Person Recall: 0.9637
- Person F1: 0.9664
- Person Number: 2121
- Overall Precision: 0.9122
- Overall Recall: 0.9307
- Overall F1: 0.9214
- Overall Accuracy: 0.9907
## Model description

More information needed

#### How to use

You can use this model with Transformers *pipeline* for NER.

```python
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("NlpHUST/ner-vietnamese-electra-base")
model = AutoModelForTokenClassification.from_pretrained("NlpHUST/ner-vietnamese-electra-base")

nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = "Liên quan vụ việc CSGT bị tố đánh dân, trúng một cháu nhỏ đang ngủ, đang lan truyền trên mạng xã hội, Đại tá Nguyễn Văn Tảo, Phó Giám đốc Công an tỉnh Tiền Giang vừa có cuộc họp cùng Chỉ huy Công an huyện Châu Thành và một số đơn vị nghiệp vụ cấp tỉnh để chỉ đạo làm rõ thông tin."

ner_results = nlp(example)
print(ner_results)
```

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 4
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 10.0

### Framework versions

- Transformers 4.20.1
- Pytorch 1.8.0+cu111
- Datasets 2.4.0
- Tokenizers 0.12.1