File size: 9,885 Bytes
5337673
 
 
 
 
 
 
 
 
 
727c087
 
 
 
 
 
 
 
 
 
6a13a62
727c087
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f3970e
727c087
9f3970e
727c087
9f3970e
727c087
a6d0d0d
 
 
727c087
 
 
 
 
 
 
 
 
9f3970e
727c087
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c224469
 
 
 
 
 
727c087
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f3970e
7b1ab37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f3970e
727c087
 
 
 
 
 
 
 
 
 
 
 
 
 
a6d0d0d
 
 
 
 
 
 
 
 
 
 
727c087
 
 
 
 
 
 
 
 
 
 
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
---
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.

# POET: A French Extended Part-of-Speech Tagger

- 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:

![Preview Output](preview.PNG)

## Training data

`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 obtain 60 different classes which add semantic information such as the gender, number, mood, person, tense or verb form given in the different CoNLL-03 fields from the original corpora.

We based our tags on the level of details given by the [LIA_TAGG](http://pageperso.lif.univ-mrs.fr/frederic.bechet/download.html) statistical POS tagger written by [Frédéric Béchet](http://pageperso.lif.univ-mrs.fr/frederic.bechet/index-english.html) in 2001.

## Original Tags

```plain
PRON VERB SCONJ ADP CCONJ DET NOUN ADJ AUX ADV PUNCT PROPN NUM SYM PART X INTJ
```

## New Tags

| Abbreviation | Description | 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 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 |

## Evaluation results

```plain
Results:
- F-score (micro): 0.952
- F-score (macro): 0.8644
- Accuracy (incl. no class): 0.952

By class:
              precision    recall  f1-score   support
      PPER1S     0.9767    1.0000    0.9882        42
        VERB     0.9823    0.9537    0.9678       583
       COSUB     0.9344    0.8906    0.9120       128
       PUNCT     0.9878    0.9688    0.9782       833
        PREP     0.9767    0.9879    0.9822      1483
      PDEMMS     0.9583    0.9200    0.9388        75
        COCO     0.9839    1.0000    0.9919       245
         DET     0.9679    0.9814    0.9746       645
         NMP     0.9521    0.9115    0.9313       305
       ADJMP     0.8352    0.9268    0.8786        82
        PREL     0.9324    0.9857    0.9583        70
       PREFP     0.9767    0.9545    0.9655        44
         AUX     0.9537    0.9859    0.9695       355
         ADV     0.9440    0.9365    0.9402       504
       VPPMP     0.8667    1.0000    0.9286        26
      DINTMS     0.9919    1.0000    0.9959       122
       ADJMS     0.9020    0.9057    0.9039       244
         NMS     0.9226    0.9336    0.9281       753
         NFS     0.9347    0.9714    0.9527       560
       YPFOR     0.9806    1.0000    0.9902       353
      PINDMS     1.0000    0.9091    0.9524        44
        NOUN     0.8400    0.5385    0.6562        39
       PROPN     0.8605    0.8278    0.8439       395
       DETMS     0.9972    0.9972    0.9972       362
     PPER3MS     0.9341    0.9770    0.9551        87
       VPPMS     0.8994    0.9682    0.9325       157
       DETFS     1.0000    1.0000    1.0000       240
       ADJFS     0.9266    0.9011    0.9136       182
       ADJFP     0.9726    0.9342    0.9530        76
         NFP     0.9463    0.9749    0.9604       199
       VPPFS     0.8000    0.9000    0.8471        40
        CHIF     0.9543    0.9414    0.9478       222
      XFAMIL     0.9346    0.8696    0.9009       115
     PPER3MP     0.9474    0.9000    0.9231        20
     PPOBJMS     0.8800    0.9362    0.9072        47
        PREF     0.8889    0.9231    0.9057        52
     PPOBJMP     1.0000    0.6000    0.7500        10
         SYM     0.9706    0.8684    0.9167        38
      DINTFS     0.9683    1.0000    0.9839        61
      PDEMFS     1.0000    0.8966    0.9455        29
     PPER3FS     1.0000    0.9444    0.9714        18
       VPPFP     0.9500    1.0000    0.9744        19
        PRON     0.9200    0.7419    0.8214        31
     PPOBJFS     0.8333    0.8333    0.8333         6
        PART     0.8000    1.0000    0.8889         4
     PPER3FP     1.0000    1.0000    1.0000         2
      MOTINC     0.3571    0.3333    0.3448        15
      PDEMMP     1.0000    0.6667    0.8000         3
        INTJ     0.4000    0.6667    0.5000         6
       PREFS     1.0000    0.5000    0.6667        10
         ADJ     0.7917    0.8636    0.8261        22
      PINDMP     0.0000    0.0000    0.0000         1
      PINDFS     1.0000    1.0000    1.0000         1
         NUM     1.0000    0.3333    0.5000         3
      PPER2S     1.0000    1.0000    1.0000         2
     PPOBJFP     1.0000    0.5000    0.6667         2
      PDEMFP     1.0000    0.6667    0.8000         3
           X     0.0000    0.0000    0.0000         1
      PRELMS     1.0000    1.0000    1.0000         2
      PINDFP     1.0000    1.0000    1.0000         1

    accuracy                         0.9520     10019
   macro avg     0.8956    0.8521    0.8644     10019
weighted avg     0.9524    0.9520    0.9515     10019
```

## BibTeX Citations

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}
}
```

LIA TAGG:

```latex
@techreport{LIA_TAGG,
  author = {Frédéric Béchet},
  title = {LIA_TAGG: a statistical POS tagger + syntactic bracketer},
  institution = {Aix-Marseille University & CNRS},
  year = {2001}
}
```

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}
}
```