Migrate model card from transformers-repo
Browse filesRead announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755
Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/HooshvareLab/bert-base-parsbert-ner-uncased/README.md
README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## ParsBERT: Transformer-based Model for Persian Language Understanding
|
| 2 |
+
|
| 3 |
+
ParsBERT is a monolingual language model based on Google’s BERT architecture with the same configurations as BERT-Base.
|
| 4 |
+
|
| 5 |
+
Paper presenting ParsBERT: [arXiv:2005.12515](https://arxiv.org/abs/2005.12515)
|
| 6 |
+
|
| 7 |
+
All the models (downstream tasks) are uncased and trained with whole word masking. (coming soon stay tuned)
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
## Persian NER [ARMAN, PEYMA, ARMAN+PEYMA]
|
| 11 |
+
|
| 12 |
+
This task aims to extract named entities in the text, such as names and label with appropriate `NER` classes such as locations, organizations, etc. The datasets used for this task contain sentences that are marked with `IOB` format. In this format, tokens that are not part of an entity are tagged as `”O”` the `”B”`tag corresponds to the first word of an object, and the `”I”` tag corresponds to the rest of the terms of the same entity. Both `”B”` and `”I”` tags are followed by a hyphen (or underscore), followed by the entity category. Therefore, the NER task is a multi-class token classification problem that labels the tokens upon being fed a raw text. There are two primary datasets used in Persian NER, `ARMAN`, and `PEYMA`. In ParsBERT, we prepared ner for both datasets as well as a combination of both datasets.
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
### PEYMA
|
| 17 |
+
|
| 18 |
+
PEYMA dataset includes 7,145 sentences with a total of 302,530 tokens from which 41,148 tokens are tagged with seven different classes.
|
| 19 |
+
|
| 20 |
+
1. Organization
|
| 21 |
+
2. Money
|
| 22 |
+
3. Location
|
| 23 |
+
4. Date
|
| 24 |
+
5. Time
|
| 25 |
+
6. Person
|
| 26 |
+
7. Percent
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
| Label | # |
|
| 30 |
+
|:------------:|:-----:|
|
| 31 |
+
| Organization | 16964 |
|
| 32 |
+
| Money | 2037 |
|
| 33 |
+
| Location | 8782 |
|
| 34 |
+
| Date | 4259 |
|
| 35 |
+
| Time | 732 |
|
| 36 |
+
| Person | 7675 |
|
| 37 |
+
| Percent | 699 |
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
**Download**
|
| 42 |
+
You can download the dataset from [here](http://nsurl.org/tasks/task-7-named-entity-recognition-ner-for-farsi/)
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
### ARMAN
|
| 47 |
+
|
| 48 |
+
ARMAN dataset holds 7,682 sentences with 250,015 sentences tagged over six different classes.
|
| 49 |
+
|
| 50 |
+
1. Organization
|
| 51 |
+
2. Location
|
| 52 |
+
3. Facility
|
| 53 |
+
4. Event
|
| 54 |
+
5. Product
|
| 55 |
+
6. Person
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
| Label | # |
|
| 59 |
+
|:------------:|:-----:|
|
| 60 |
+
| Organization | 30108 |
|
| 61 |
+
| Location | 12924 |
|
| 62 |
+
| Facility | 4458 |
|
| 63 |
+
| Event | 7557 |
|
| 64 |
+
| Product | 4389 |
|
| 65 |
+
| Person | 15645 |
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
**Download**
|
| 70 |
+
You can download the dataset from [here](https://github.com/HaniehP/PersianNER)
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
## Results
|
| 75 |
+
|
| 76 |
+
The following table summarizes the F1 score obtained by ParsBERT as compared to other models and architectures.
|
| 77 |
+
|
| 78 |
+
| Dataset | ParsBERT | MorphoBERT | Beheshti-NER | LSTM-CRF | Rule-Based CRF | BiLSTM-CRF |
|
| 79 |
+
|:---------------:|:--------:|:----------:|:--------------:|:----------:|:----------------:|:------------:|
|
| 80 |
+
| ARMAN + PEYMA | 95.13* | - | - | - | - | - |
|
| 81 |
+
| PEYMA | 98.79* | - | 90.59 | - | 84.00 | - |
|
| 82 |
+
| ARMAN | 93.10* | 89.9 | 84.03 | 86.55 | - | 77.45 |
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
## How to use :hugs:
|
| 86 |
+
| Notebook | Description | |
|
| 87 |
+
|:----------|:-------------|------:|
|
| 88 |
+
| [How to use Pipelines](https://github.com/hooshvare/parsbert-ner/blob/master/persian-ner-pipeline.ipynb) | Simple and efficient way to use State-of-the-Art models on downstream tasks through transformers | [](https://colab.research.google.com/github/hooshvare/parsbert-ner/blob/master/persian-ner-pipeline.ipynb) |
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
## Cite
|
| 92 |
+
|
| 93 |
+
Please cite the following paper in your publication if you are using [ParsBERT](https://arxiv.org/abs/2005.12515) in your research:
|
| 94 |
+
|
| 95 |
+
```markdown
|
| 96 |
+
@article{ParsBERT,
|
| 97 |
+
title={ParsBERT: Transformer-based Model for Persian Language Understanding},
|
| 98 |
+
author={Mehrdad Farahani, Mohammad Gharachorloo, Marzieh Farahani, Mohammad Manthouri},
|
| 99 |
+
journal={ArXiv},
|
| 100 |
+
year={2020},
|
| 101 |
+
volume={abs/2005.12515}
|
| 102 |
+
}
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
## Acknowledgments
|
| 107 |
+
|
| 108 |
+
We hereby, express our gratitude to the [Tensorflow Research Cloud (TFRC) program](https://tensorflow.org/tfrc) for providing us with the necessary computation resources. We also thank [Hooshvare](https://hooshvare.com) Research Group for facilitating dataset gathering and scraping online text resources.
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
## Contributors
|
| 112 |
+
|
| 113 |
+
- Mehrdad Farahani: [Linkedin](https://www.linkedin.com/in/m3hrdadfi/), [Twitter](https://twitter.com/m3hrdadfi), [Github](https://github.com/m3hrdadfi)
|
| 114 |
+
- Mohammad Gharachorloo: [Linkedin](https://www.linkedin.com/in/mohammad-gharachorloo/), [Twitter](https://twitter.com/MGharachorloo), [Github](https://github.com/baarsaam)
|
| 115 |
+
- Marzieh Farahani: [Linkedin](https://www.linkedin.com/in/marziehphi/), [Twitter](https://twitter.com/marziehphi), [Github](https://github.com/marziehphi)
|
| 116 |
+
- Mohammad Manthouri: [Linkedin](https://www.linkedin.com/in/mohammad-manthouri-aka-mansouri-07030766/), [Twitter](https://twitter.com/mmanthouri), [Github](https://github.com/mmanthouri)
|
| 117 |
+
- Hooshvare Team: [Official Website](https://hooshvare.com/), [Linkedin](https://www.linkedin.com/company/hooshvare), [Twitter](https://twitter.com/hooshvare), [Github](https://github.com/hooshvare), [Instagram](https://www.instagram.com/hooshvare/)
|
| 118 |
+
|
| 119 |
+
+ And a special thanks to Sara Tabrizi for her fantastic poster design. Follow her on: [Linkedin](https://www.linkedin.com/in/sara-tabrizi-64548b79/), [Behance](https://www.behance.net/saratabrizi), [Instagram](https://www.instagram.com/sara_b_tabrizi/)
|
| 120 |
+
|
| 121 |
+
## Releases
|
| 122 |
+
|
| 123 |
+
### Release v0.1 (May 29, 2019)
|
| 124 |
+
This is the first version of our ParsBERT NER!
|