--- tags: - flair - token-classification - sequence-tagger-model language: fr widget: - text: "George Washington est allé à Washington" --- **People Involved** * LABRAK Yanis (1) * DUFOUR Richard (2) **Affiliations** 1. LIA, Avignon University, Avignon, France. 2. LS2N, Nantes University, Nantes, France. # French Part-Of-Speech (POS) Tagging - Corpus: [UD_FRENCH_TREEBANKS](https://universaldependencies.org/treebanks/fr_gsd/index.html) - Model: [Flair](https://www.aclweb.org/anthology/C18-1139.pdf) - Embeddings: [FastText](https://fasttext.cc/) - Additionnel: [LSTM-CRF](https://arxiv.org/abs/1011.4088) - Nombre d'Epochs: 115 ## Demo: How to use in Flair Requires [Flair](https://pypi.org/project/flair/): ```pip install flair``` ```python from flair.data import Sentence from flair.models import SequenceTagger # Load the model model = SequenceTagger.load("qanastek/pos-french") sentence = Sentence("George Washington est allé à Washington") # predict tags model.predict(sentence) # print predicted pos tags print(sentence.to_tagged_string()) ``` Output: ```bash George Washington est allé à Washington ``` ## Corpora `UD_FRENCH_GSD_PLUS` is a part-of-speech tagging corpora based on [UD_French-GSD](https://universaldependencies.org/treebanks/fr_gsd/index.html) which was originally created in 2015 and is based on the [universal dependency treebank v2.0](https://github.com/ryanmcd/uni-dep-tb). Originally, the corpora consists of 400,399 words (16,341 sentences) and had 17 different classes. Now, after applying our tags augmentation we obtains 60 different classes which add semantic information such as the gender, number, mood, person, tense or verb form. ## Original Tags ```plain PRON VERB SCONJ ADP CCONJ DET NOUN ADJ AUX ADV PUNCT PROPN NUM SYM PART X INTJ ``` ## New Tags | Tag | Full Name | Examples | |:--------:|:--------:|:--------:| | PREP | Preposition | de | | AUX | Auxiliary Verb | est | | ADV | Adverb | toujours | | COSUB | Subordinating conjunction | que | | COCO | Coordinating Conjunction | et | | PART | Demonstrative particle | -t | | PRON | Pronoun | qui ce quoi | | PDEMMS | Singular Masculine Demonstrative Pronoun | ce | | PDEMMP | Plurial Masculine Demonstrative Pronoun | ceux | | PDEMFS | Singular Feminine Demonstrative Pronoun | cette | | PDEMFP | Plurial Feminine Demonstrative Pronoun | celles | | PINDMS | Singular Masculine Indefinite Pronoun | tout | | PINDMP | Plurial Masculine Indefinite Pronoun | autres | | PINDFS | Singular Feminine Indefinite Pronoun | chacune | | PINDFP | Plurial Feminine Indefinite Pronoun | certaines | | PROPN | Proper noun | houston | | XFAMIL | Last name | levy | | NUM | Numerical Adjectives | trentaine vingtaine | | DINTMS | Masculine Numerical Adjectives | un | | DINTFS | Feminine Numerical Adjectives | une | | PPOBJMS | Singular Masculine Pronoun complements of objects | le lui | | PPOBJMP | Plurial Masculine Pronoun complements of objects | eux y | | PPOBJFS | Singular Feminine Pronoun complements of objects | moi la | | PPOBJFP | Plurial Feminine Pronoun complements of objects | en y | | PPER1S | Personal Pronoun first Person Singular | je | | PPER2S | Personal Pronoun second Person du Singular | tu | | PPER3MS | Personal Pronoun third Person Masculine Singular | il | | PPER3MP | Personal Pronoun third Person Masculine Plurial | ils | | PPER3FS | Personal Pronoun third Person Feminine Singular | elle | | PPER3FP | Personal Pronoun third Person Feminine Plurial | elles | | PREFS | Reflexive Pronouns First Person of Singular | me m' | | PREF | Reflexive Pronouns Third Person of Singular | se s' | | PREFP | Reflexive Pronouns First / Second Person of Plurial | nous vous | | VERB | Verb | obtient | | VPPMS | Singular Masculine Participle Past Verb | formulé | | VPPMP | Plurial Masculine Participle Past Verb | classés | | VPPFS | Singular Feminine Participle Past Verb | appelée | | VPPFP | Plurial Feminine Participle Past Verb | sanctionnées | | DET | Determinant | les l' | | DETMS | Singular Masculine Determinant | les | | DETFS | Singular Feminine Determinant | la | | ADJ | Adjective | capable sérieux | | ADJMS | Singular Masculine Adjective | grand important | | ADJMP | Plurial Masculine Adjective | grands petits | | ADJFS | Singular Feminine Adjective | française petite | | ADJFP | Plurial Feminine Adjective | légères petites | | NOUN | Noun | temps | | NMS | Singular Masculine Noun | drapeau | | NMP | Plurial Masculine Noun | journalistes | | NFS | Singular Feminine Noun | tête | | NFP | Plurial Feminine Noun | ondes | | PREL | Relative Pronoun | qui dont | | PRELMS | Singular Masculine Relative Pronoun | lequel | | PRELMP | Plurial Masculine Relative Pronoun | lesquels | | PRELFS | Singular Feminine Relative Pronoun | laquelle | | PRELFP | Plurial Feminine Relative Pronoun | lesquelles | | INTJ | Interjection | merci bref | | CHIF | Numbers | 1979 10 | | SYM | Symbol | € % | | YPFOR | Endpoint | . | | PUNCT | Ponctuation | : , | | MOTINC | Unknown words | Technology Lady | | X | Typos & others | sfeir 3D statu | ## Cite Please cite the following paper when using this model. UD_French-GSD corpora: ```latex @misc{ universaldependencies, title={UniversalDependencies/UD_French-GSD}, url={https://github.com/UniversalDependencies/UD_French-GSD}, journal={GitHub}, author={UniversalDependencies} } ``` Flair Embeddings: ```latex @inproceedings{akbik2018coling, title={Contextual String Embeddings for Sequence Labeling}, author={Akbik, Alan and Blythe, Duncan and Vollgraf, Roland}, booktitle = {{COLING} 2018, 27th International Conference on Computational Linguistics}, pages = {1638--1649}, year = {2018} } ```