Views
No views yet
| 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 |
pip install flair)1from flair.data import Sentence
2from flair.models import SequenceTagger
3
4# load tagger
5tagger = SequenceTagger.load("hamedkhaledi/persain-flair-pos")
6
7# make example sentence
8sentence = Sentence("تمام ایران یک تابستان تنوری را تجربه میکند .")
9
10tagger.predict(sentence)
11# print result
12print(sentence.to_tagged_string())تمام <DET> ایران <N_SING> یک <NUM> تابستان <N_SING> تنوری <ADJ> را <CLITIC> تجربه <N_SING> میکند <V_PRS> . <DELM>