yeshpanovrustem
commited on
Commit
·
cc873a9
1
Parent(s):
a1f011e
Update README.md
Browse files
README.md
CHANGED
@@ -29,6 +29,23 @@ datasets:
|
|
29 |
- The model was inspired by the [LREC 2022](https://lrec2022.lrec-conf.org/en/) paper [*KazNERD: Kazakh Named Entity Recognition Dataset*](https://aclanthology.org/2022.lrec-1.44).
|
30 |
- The original repository for the paper can be found at *https://github.com/IS2AI/KazNERD*.
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
## Evaluation results on the validation and test sets
|
33 |
| | Validation set | | | Test set| |
|
34 |
|:---:| :---: | :---: | :---: | :---: | :---: |
|
|
|
29 |
- The model was inspired by the [LREC 2022](https://lrec2022.lrec-conf.org/en/) paper [*KazNERD: Kazakh Named Entity Recognition Dataset*](https://aclanthology.org/2022.lrec-1.44).
|
30 |
- The original repository for the paper can be found at *https://github.com/IS2AI/KazNERD*.
|
31 |
|
32 |
+
## How to use
|
33 |
+
You can use this model with Transformers *pipeline* for NER.
|
34 |
+
|
35 |
+
```python
|
36 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
37 |
+
from transformers import pipeline
|
38 |
+
|
39 |
+
tokenizer = AutoTokenizer.from_pretrained("yeshpanovrustem/xlm-roberta-large-ner-kazakh")
|
40 |
+
model = AutoModelForTokenClassification.from_pretrained("yeshpanovrustem/xlm-roberta-large-ner-kazakh")
|
41 |
+
|
42 |
+
nlp = pipeline("ner", model = model, tokenizer = tokenizer)
|
43 |
+
example = "Қазақстан Республикасы — Шығыс Еуропа мен Орталық Азияда орналасқан мемлекет."
|
44 |
+
|
45 |
+
ner_results = nlp(example)
|
46 |
+
print(ner_results)
|
47 |
+
```
|
48 |
+
|
49 |
## Evaluation results on the validation and test sets
|
50 |
| | Validation set | | | Test set| |
|
51 |
|:---:| :---: | :---: | :---: | :---: | :---: |
|