BookNLP-fr_NER_camembert-large / JCLS_model_card.md
AntoineBourgois's picture
Upload 3 files
302fd8d verified
|
raw
history blame
7.47 kB
---
language: fr
tags:
- NER
- camembert
- literary-texts
- nested-entities
- BookBLP-fr
license: apache-2.0
metrics:
- f1
- precision
- recall
base_model:
- almanach/camembert-large
pipeline_tag: token-classification
---
## INTRODUCTION:
This model, developed as part of the [BookNLP-fr project](https://github.com/lattice-8094/fr-litbank), is a NER model built on top of [camembert-large](https://huggingface.co/almanach/camembert-large) embeddings, trained to predict nested entities in french, specifically for literary texts.
The predicted entities are:
- mentions of characters (PER): pronouns (je, tu, il, ...), possessive pronouns (mon, ton, son, ...), common nouns (le capitaine, la princesse, ...) and proper nouns (Indiana Delmare, Honoré de Pardaillan, ...)
- facilities (FAC): chatêau, sentier, chambre, couloir, ...
- time (TIME): le règne de Louis XIV, ce matin, en juillet, ...
- geo-political entities (GPE): Montrouge, France, le petit hameau, ...
- locations (LOC): le sud, Mars, l'océan, le bois, ...
- vehicles (VEH): avion, voitures, calèche, vélos, ...
## MODEL PERFORMANCES (LOOCV):
| NER_tag | precision | recall | f1_score | support | support % |
|-----------|-------------|----------|------------|-----------|-------------|
| PER | 91.30% | 95.59% | 93.40% | 4,061 | 85.80% |
| FAC | 75.68% | 75.00% | 75.34% | 224 | 4.73% |
| TIME | 68.61% | 71.50% | 70.02% | 214 | 4.52% |
| LOC | 63.54% | 55.45% | 59.22% | 110 | 2.32% |
| GPE | 78.33% | 73.44% | 75.81% | 64 | 1.35% |
| VEH | 64.52% | 66.67% | 65.57% | 60 | 1.27% |
| micro_avg | 88.37% | 91.93% | 90.10% | 4,733 | 100.00% |
| macro_avg | 73.66% | 72.94% | 73.23% | 4,733 | 100.00% |
## TRAINING PARAMETERS:
- Entities types: ['PER', 'LOC', 'FAC', 'TIME', 'VEH', 'GPE']
- Tagging scheme: BIOES
- Nested entities levels: [0, 1]
- Split strategy: Leave-one-out cross-validation (28 files)
- Train/Validation split: 0.85 / 0.15
- Batch size: 16
- Initial learning rate: 0.00014
## MODEL ARCHITECTURE:
Model Input: Maximum context camembert-large embeddings (1024 dimensions)
- Locked Dropout: 0.5
- Projection layer:
- layer type: highway layer
- input: 1024 dimensions
- output: 2048 dimensions
- BiLSTM layer:
- input: 2048 dimensions
- output: 256 dimensions (hidden state)
- Linear layer:
- input: 256 dimensions
- output: 25 dimensions (predicted labels with BIOES tagging scheme)
- CRF layer
Model Output: BIOES labels sequence
## HOW TO USE:
*** IN CONSTRUCTION ***
## TRAINING CORPUS:
| | Document | Tokens Count | Is included in model eval |
|----|----------------------------------------------------------------|----------------|-----------------------------------|
| 0 | 1836_Gautier-Theophile_La-morte-amoureuse | 14,299 tokens | False |
| 1 | 1840_Sand-George_Pauline | 12,315 tokens | False |
| 2 | 1842_Balzac-Honore-de_La-Maison-du-chat-qui-pelote | 24,776 tokens | False |
| 3 | 1844_Balzac-Honore-de_La-Maison-Nucingen | 30,987 tokens | False |
| 4 | 1844_Balzac-Honore-de_Sarrasine | 15,408 tokens | False |
| 5 | 1856_Cousin-Victor_Madame-de-Hautefort | 11,768 tokens | False |
| 6 | 1863_Gautier-Theophile_Le-capitaine-Fracasse | 11,834 tokens | False |
| 7 | 1873_Zola-Emile_Le-ventre-de-Paris | 12,557 tokens | False |
| 8 | 1881_Flaubert-Gustave_Bouvard-et-Pecuchet | 12,281 tokens | False |
| 9 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_1-MADEMOISELLE-FIFI | 5,425 tokens | True |
| 10 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_2-MADAME-BAPTISTE | 2,554 tokens | True |
| 11 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_3-LA-ROUILLE | 2,929 tokens | True |
| 12 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_1-MARROCA | 4,067 tokens | False |
| 13 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_2-LA-BUCHE | 2,251 tokens | False |
| 14 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_3-LA-RELIQUE | 2,034 tokens | False |
| 15 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_1-FOU | 1,864 tokens | False |
| 16 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_2-REVEIL | 2,141 tokens | False |
| 17 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_3-UNE-RUSE | 2,441 tokens | False |
| 18 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_4-A-CHEVAL | 2,860 tokens | False |
| 19 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_5-UN-REVEILLON | 2,343 tokens | False |
| 20 | 1901_Lucie-Achard_Rosalie-de-Constant-sa-famille-et-ses-amis | 12,703 tokens | False |
| 21 | 1903_Conan-Laure_Elisabeth_Seton | 13,023 tokens | False |
| 22 | 1904_Rolland-Romain_Jean-Christophe_Tome-I-L-aube | 10,982 tokens | True |
| 23 | 1904_Rolland-Romain_Jean-Christophe_Tome-II-Le-matin | 10,305 tokens | False |
| 24 | 1917_Adèle-Bourgeois_Némoville | 12,389 tokens | False |
| 25 | 1923_Radiguet-Raymond_Le-diable-au-corps | 14,637 tokens | False |
| 26 | 1926_Audoux-Marguerite_De-la-ville-au-moulin | 11,902 tokens | True |
| 27 | 1937_Audoux-Marguerite_Douce-Lumiere | 12,285 tokens | False |
| 28 | TOTAL | 275,360 tokens | 5 files used for cross-validation |
## PREDICTIONS CONFUSION MATRIX:
| Gold Labels | PER | FAC | TIME | LOC | GPE | VEH | O | support |
|---------------|-------|-------|--------|-------|-------|-------|-----|-----------|
| PER | 3,882 | 3 | 2 | 2 | 2 | 0 | 170 | 4,061 |
| FAC | 7 | 168 | 0 | 0 | 0 | 1 | 48 | 224 |
| TIME | 1 | 0 | 153 | 0 | 0 | 0 | 60 | 214 |
| LOC | 0 | 1 | 0 | 61 | 7 | 0 | 41 | 110 |
| GPE | 1 | 3 | 0 | 3 | 47 | 0 | 10 | 64 |
| VEH | 2 | 0 | 1 | 0 | 0 | 40 | 17 | 60 |
| O | 357 | 47 | 66 | 30 | 4 | 21 | 0 | 525 |
## CONTACT:
mail: antoine [dot] bourgois [at] protonmail [dot] com