hamedkhaledi
commited on
Commit
•
0b5f626
1
Parent(s):
d108b16
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- flair
|
4 |
+
- token-classification
|
5 |
+
- sequence-tagger-model
|
6 |
+
language: fa
|
7 |
+
datasets:
|
8 |
+
- UPC-2017
|
9 |
+
widget:
|
10 |
+
- text: "تمام ایران یک تابستان تنوری را تجربه میکند ."
|
11 |
+
---
|
12 |
+
|
13 |
+
## Persian Part-of-Speech Tagging in Flair
|
14 |
+
|
15 |
+
This is the part-of-speech tagging model for Persian that ships with [Flair](https://github.com/flairNLP/flair/).
|
16 |
+
|
17 |
+
F1-Score: **??** (UPC-2017)
|
18 |
+
|
19 |
+
List of Tags in UPC:
|
20 |
+
|
21 |
+
| **tag** | **meaning** |
|
22 |
+
|:--------:|:-----------------------:|
|
23 |
+
| ADJ | adjective |
|
24 |
+
| ADJ_CMPR | Comparative adjective |
|
25 |
+
| ADJ_INO | Participle adjective |
|
26 |
+
| ADJ_SUP | Superlative adjective |
|
27 |
+
| ADJ_VOC | Vocative adjective |
|
28 |
+
| ADV | Adverb |
|
29 |
+
| ADV_COMP | Adverb of comparison |
|
30 |
+
| ADV_I | Adverb of interrogation |
|
31 |
+
| ADV_LOC | Adverb of location |
|
32 |
+
| ADV_NEG | Adverb of negation |
|
33 |
+
| ADV_TIME | Adverb of time |
|
34 |
+
| CLITIC | Accusative marker |
|
35 |
+
| CON | Conjunction |
|
36 |
+
| DELM | Delimiter |
|
37 |
+
| DET | Determiner |
|
38 |
+
| FW | Foreign Word |
|
39 |
+
| INT | Interjection |
|
40 |
+
| N_PL | Plural noun |
|
41 |
+
| N_SING | Singular noun |
|
42 |
+
| NUM | Numeral |
|
43 |
+
| N_VOC | Vocative noun |
|
44 |
+
| P | Preposition |
|
45 |
+
| PREV | Preverbal particle |
|
46 |
+
| PRO | Pronoun |
|
47 |
+
| SYM | Symbol |
|
48 |
+
| V_AUX | Auxiliary verb |
|
49 |
+
| V_PA | Past tense verb |
|
50 |
+
| V_PP | Past participle verb |
|
51 |
+
| V_PRS | Present tense verb |
|
52 |
+
| V_SUB | Subjunctive verb |
|
53 |
+
|
54 |
+
---
|
55 |
+
|
56 |
+
### Demo: How to use in Flair
|
57 |
+
|
58 |
+
Requires: **[Flair](https://github.com/flairNLP/flair/)** (`pip install flair`)
|
59 |
+
|
60 |
+
```python
|
61 |
+
from flair.data import Sentence
|
62 |
+
from flair.models import SequenceTagger
|
63 |
+
|
64 |
+
# load tagger
|
65 |
+
tagger = SequenceTagger.load("hamedkhaledi/persain-flair-pos")
|
66 |
+
|
67 |
+
# make example sentence
|
68 |
+
sentence = Sentence("تمام ایران یک تابستان تنوری را تجربه میکند .")
|
69 |
+
|
70 |
+
tagger.predict(sentence)
|
71 |
+
# print result
|
72 |
+
print(sentence.to_tagged_string())
|
73 |
+
```
|
74 |
+
|
75 |
+
This yields the following output:
|
76 |
+
|
77 |
+
```
|
78 |
+
تمام <DET> ایران <N_SING> یک <NUM> تابستان <N_SING> تنوری <ADJ> را <CLITIC> تجربه <N_SING> میکند <V_PRS> . <DELM>
|
79 |
+
```
|