Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,68 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Hugging Face's logo
|
| 2 |
---
|
| 3 |
+
language:
|
| 4 |
+
- ar
|
| 5 |
+
- as
|
| 6 |
+
- bn
|
| 7 |
+
- ca
|
| 8 |
+
- en
|
| 9 |
+
- es
|
| 10 |
+
- eu
|
| 11 |
+
- fr
|
| 12 |
+
- gu
|
| 13 |
+
- hi
|
| 14 |
+
- id
|
| 15 |
+
- ig
|
| 16 |
+
- mr
|
| 17 |
+
- pa
|
| 18 |
+
- pt
|
| 19 |
+
- sw
|
| 20 |
+
- ur
|
| 21 |
+
- vi
|
| 22 |
+
- yo
|
| 23 |
+
- zh
|
| 24 |
+
- multilingual
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
datasets:
|
| 28 |
+
- wikiann
|
| 29 |
---
|
| 30 |
+
# xlm-roberta-base-wikiann-ner
|
| 31 |
+
## Model description
|
| 32 |
+
**xlm-roberta-base-wikiann-ner** is the first **Named Entity Recognition** model for 20 languages (Arabic, Assamese, Bengali, Catalan, English, Spanish, Basque, French, Gujarati, Hindi, Indonesia, Igbo, Marathi, Punjabi, Portugues and Swahili, Urdu, Vietnamese, Yoruba, Chinese) based on a fine-tuned XLM-RoBERTa large model. It achieves the **state-of-the-art performance** for the NER task. It has been trained to recognize three types of entities: location (LOC), organizations (ORG), and person (PER).
|
| 33 |
+
Specifically, this model is a *xlm-roberta-large* model that was fine-tuned on an aggregation of languages datasets obtained from [WikiANN](https://huggingface.co/datasets/wikiann) dataset.
|
| 34 |
+
## Intended uses & limitations
|
| 35 |
+
#### How to use
|
| 36 |
+
You can use this model with Transformers *pipeline* for NER.
|
| 37 |
+
```python
|
| 38 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
| 39 |
+
from transformers import pipeline
|
| 40 |
+
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-base-wikiann-ner")
|
| 41 |
+
model = AutoModelForTokenClassification.from_pretrained("xlm-roberta-base-wikiann-ner")
|
| 42 |
+
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
| 43 |
+
example = "Ìbọn ń ró kù kù gẹ́gẹ́ bí ọwọ́ ọ̀pọ̀ aráàlù ṣe tẹ ìbọn ní Kyiv láti dojú kọ Russia"
|
| 44 |
+
ner_results = nlp(example)
|
| 45 |
+
print(ner_results)
|
| 46 |
+
```
|
| 47 |
+
#### Limitations and bias
|
| 48 |
+
This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains.
|
| 49 |
+
## Training data
|
| 50 |
+
This model was fine-tuned on 20 NER datasets (Arabic, Assamese, Bengali, Catalan, English, Spanish, Basque, French, Gujarati, Hindi, Indonesia, Igbo, Marathi, Punjabi, Portugues and Swahili, Urdu, Vietnamese, Yoruba, Chinese)[wikiann](https://huggingface.co/datasets/wikiann).
|
| 51 |
+
|
| 52 |
+
The training dataset distinguishes between the beginning and continuation of an entity so that if there are back-to-back entities of the same type, the model can output where the second entity begins. As in the dataset, each token will be classified as one of the following classes:
|
| 53 |
+
Abbreviation|Description
|
| 54 |
+
-|-
|
| 55 |
+
O|Outside of a named entity
|
| 56 |
+
B-PER |Beginning of a person’s name right after another person’s name
|
| 57 |
+
I-PER |Person’s name
|
| 58 |
+
B-ORG |Beginning of an organisation right after another organisation
|
| 59 |
+
I-ORG |Organisation
|
| 60 |
+
B-LOC |Beginning of a location right after another location
|
| 61 |
+
I-LOC |Location
|
| 62 |
+
|
| 63 |
+
### BibTeX entry and citation info
|
| 64 |
+
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|