File size: 2,392 Bytes
0b5f626 |
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 |
---
tags:
- flair
- token-classification
- sequence-tagger-model
language: fa
datasets:
- UPC-2017
widget:
- text: "تمام ایران یک تابستان تنوری را تجربه میکند ."
---
## Persian Part-of-Speech Tagging in Flair
This is the part-of-speech tagging model for Persian that ships with [Flair](https://github.com/flairNLP/flair/).
F1-Score: **??** (UPC-2017)
List of Tags in UPC:
| **tag** | **meaning** |
|:--------:|:-----------------------:|
| ADJ | adjective |
| ADJ_CMPR | Comparative adjective |
| ADJ_INO | Participle adjective |
| ADJ_SUP | Superlative adjective |
| ADJ_VOC | Vocative adjective |
| ADV | Adverb |
| ADV_COMP | Adverb of comparison |
| ADV_I | Adverb of interrogation |
| ADV_LOC | Adverb of location |
| ADV_NEG | Adverb of negation |
| ADV_TIME | Adverb of time |
| CLITIC | Accusative marker |
| CON | Conjunction |
| DELM | Delimiter |
| DET | Determiner |
| FW | Foreign Word |
| INT | Interjection |
| N_PL | Plural noun |
| N_SING | Singular noun |
| NUM | Numeral |
| N_VOC | Vocative noun |
| P | Preposition |
| PREV | Preverbal particle |
| PRO | Pronoun |
| SYM | Symbol |
| V_AUX | Auxiliary verb |
| V_PA | Past tense verb |
| V_PP | Past participle verb |
| V_PRS | Present tense verb |
| V_SUB | Subjunctive verb |
---
### Demo: How to use in Flair
Requires: **[Flair](https://github.com/flairNLP/flair/)** (`pip install flair`)
```python
from flair.data import Sentence
from flair.models import SequenceTagger
# load tagger
tagger = SequenceTagger.load("hamedkhaledi/persain-flair-pos")
# make example sentence
sentence = Sentence("تمام ایران یک تابستان تنوری را تجربه میکند .")
tagger.predict(sentence)
# print result
print(sentence.to_tagged_string())
```
This yields the following output:
```
تمام <DET> ایران <N_SING> یک <NUM> تابستان <N_SING> تنوری <ADJ> را <CLITIC> تجربه <N_SING> میکند <V_PRS> . <DELM>
``` |