Upload 3 files
Browse files- JCLS_model_card.md +115 -0
- README.md +115 -0
- final_model.pkl +3 -0
JCLS_model_card.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
language: fr
|
| 4 |
+
tags:
|
| 5 |
+
- NER
|
| 6 |
+
- camembert
|
| 7 |
+
- literary-texts
|
| 8 |
+
- nested-entities
|
| 9 |
+
- BookNLP-fr
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
metrics:
|
| 12 |
+
- f1
|
| 13 |
+
- precision
|
| 14 |
+
- recall
|
| 15 |
+
base_model:
|
| 16 |
+
- almanach/camembert-large
|
| 17 |
+
pipeline_tag: token-classification
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## INTRODUCTION:
|
| 21 |
+
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.
|
| 22 |
+
|
| 23 |
+
The predicted entities are:
|
| 24 |
+
- 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, ...)
|
| 25 |
+
- facilities (FAC): chatêau, sentier, chambre, couloir, ...
|
| 26 |
+
- time (TIME): le règne de Louis XIV, ce matin, en juillet, ...
|
| 27 |
+
- geo-political entities (GPE): Montrouge, France, le petit hameau, ...
|
| 28 |
+
- locations (LOC): le sud, Mars, l'océan, le bois, ...
|
| 29 |
+
- vehicles (VEH): avion, voitures, calèche, vélos, ...
|
| 30 |
+
|
| 31 |
+
## MODEL PERFORMANCES (LOOCV):
|
| 32 |
+
| NER_tag | precision | recall | f1_score | support | support % |
|
| 33 |
+
|-----------|-------------|----------|------------|-----------|-------------|
|
| 34 |
+
| PER | 91.54% | 95.35% | 93.40% | 4,061 | 100.00% |
|
| 35 |
+
| micro_avg | 91.54% | 95.35% | 93.40% | 4,061 | 100.00% |
|
| 36 |
+
| macro_avg | 91.54% | 95.35% | 93.40% | 4,061 | 100.00% |
|
| 37 |
+
|
| 38 |
+
## TRAINING PARAMETERS:
|
| 39 |
+
- Entities types: ['PER']
|
| 40 |
+
- Tagging scheme: BIOES
|
| 41 |
+
- Nested entities levels: [0, 1]
|
| 42 |
+
- Split strategy: Leave-one-out cross-validation (31 files)
|
| 43 |
+
- Train/Validation split: 0.85 / 0.15
|
| 44 |
+
- Batch size: 16
|
| 45 |
+
- Initial learning rate: 0.00014
|
| 46 |
+
|
| 47 |
+
## MODEL ARCHITECTURE:
|
| 48 |
+
Model Input: Maximum context camembert-large embeddings (1024 dimensions)
|
| 49 |
+
|
| 50 |
+
- Locked Dropout: 0.5
|
| 51 |
+
|
| 52 |
+
- Projection layer:
|
| 53 |
+
- layer type: highway layer
|
| 54 |
+
- input: 1024 dimensions
|
| 55 |
+
- output: 2048 dimensions
|
| 56 |
+
|
| 57 |
+
- BiLSTM layer:
|
| 58 |
+
- input: 2048 dimensions
|
| 59 |
+
- output: 256 dimensions (hidden state)
|
| 60 |
+
|
| 61 |
+
- Linear layer:
|
| 62 |
+
- input: 256 dimensions
|
| 63 |
+
- output: 5 dimensions (predicted labels with BIOES tagging scheme)
|
| 64 |
+
|
| 65 |
+
- CRF layer
|
| 66 |
+
|
| 67 |
+
Model Output: BIOES labels sequence
|
| 68 |
+
|
| 69 |
+
## HOW TO USE:
|
| 70 |
+
*** IN CONSTRUCTION ***
|
| 71 |
+
|
| 72 |
+
## TRAINING CORPUS:
|
| 73 |
+
| | Document | Tokens Count | Is included in model eval |
|
| 74 |
+
|----|----------------------------------------------------------------|----------------|-----------------------------------|
|
| 75 |
+
| 0 | 1731_Prévost-Antoine-François_Manon-Lescaut_PER-ONLY | 71,219 tokens | False |
|
| 76 |
+
| 1 | 1832_Sand-George_Indiana_PER-ONLY | 112,221 tokens | False |
|
| 77 |
+
| 2 | 1836_Gautier-Theophile_La-morte-amoureuse | 14,293 tokens | False |
|
| 78 |
+
| 3 | 1840_Sand-George_Pauline | 12,407 tokens | False |
|
| 79 |
+
| 4 | 1842_Balzac-Honore-de_La-Maison-du-chat-qui-pelote | 24,776 tokens | False |
|
| 80 |
+
| 5 | 1844_Balzac-Honore-de_La-Maison-Nucingen | 30,034 tokens | False |
|
| 81 |
+
| 6 | 1844_Balzac-Honore-de_Sarrasine | 15,408 tokens | False |
|
| 82 |
+
| 7 | 1856_Cousin-Victor_Madame-de-Hautefort | 11,768 tokens | False |
|
| 83 |
+
| 8 | 1863_Gautier-Theophile_Le-capitaine-Fracasse | 11,855 tokens | False |
|
| 84 |
+
| 9 | 1873_Zola-Emile_Le-ventre-de-Paris | 12,617 tokens | False |
|
| 85 |
+
| 10 | 1881_Flaubert-Gustave_Bouvard-et-Pecuchet | 12,320 tokens | False |
|
| 86 |
+
| 11 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_1-MADEMOISELLE-FIFI | 5,449 tokens | True |
|
| 87 |
+
| 12 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_2-MADAME-BAPTISTE | 2,579 tokens | True |
|
| 88 |
+
| 13 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_3-LA-ROUILLE | 2,949 tokens | True |
|
| 89 |
+
| 14 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_1-MARROCA | 4,081 tokens | False |
|
| 90 |
+
| 15 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_2-LA-BUCHE | 2,267 tokens | False |
|
| 91 |
+
| 16 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_3-LA-RELIQUE | 2,042 tokens | False |
|
| 92 |
+
| 17 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_1-FOU | 1,906 tokens | False |
|
| 93 |
+
| 18 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_2-REVEIL | 2,160 tokens | False |
|
| 94 |
+
| 19 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_3-UNE-RUSE | 2,470 tokens | False |
|
| 95 |
+
| 20 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_4-A-CHEVAL | 2,880 tokens | False |
|
| 96 |
+
| 21 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_5-UN-REVEILLON | 2,365 tokens | False |
|
| 97 |
+
| 22 | 1901_Lucie-Achard_Rosalie-de-Constant-sa-famille-et-ses-amis | 12,789 tokens | False |
|
| 98 |
+
| 23 | 1903_Conan-Laure_Elisabeth_Seton | 13,054 tokens | False |
|
| 99 |
+
| 24 | 1904_Rolland-Romain_Jean-Christophe_Tome-I-L-aube | 10,982 tokens | True |
|
| 100 |
+
| 25 | 1904_Rolland-Romain_Jean-Christophe_Tome-II-Le-matin | 10,305 tokens | False |
|
| 101 |
+
| 26 | 1917_Adèle-Bourgeois_Némoville | 12,478 tokens | False |
|
| 102 |
+
| 27 | 1923_Delly_Dans-les-ruines | 95,617 tokens | False |
|
| 103 |
+
| 28 | 1923_Radiguet-Raymond_Le-diable-au-corps | 14,860 tokens | False |
|
| 104 |
+
| 29 | 1926_Audoux-Marguerite_De-la-ville-au-moulin | 12,092 tokens | True |
|
| 105 |
+
| 30 | 1937_Audoux-Marguerite_Douce-Lumiere | 12,348 tokens | False |
|
| 106 |
+
| 31 | TOTAL | 554,591 tokens | 5 files used for cross-validation |
|
| 107 |
+
|
| 108 |
+
## PREDICTIONS CONFUSION MATRIX:
|
| 109 |
+
| Gold Labels | PER | O | support |
|
| 110 |
+
|---------------|-------|-----|-----------|
|
| 111 |
+
| PER | 3,872 | 189 | 4,061 |
|
| 112 |
+
| O | 348 | 0 | 348 |
|
| 113 |
+
|
| 114 |
+
## CONTACT:
|
| 115 |
+
mail: antoine [dot] bourgois [at] protonmail [dot] com
|
README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
language: fr
|
| 4 |
+
tags:
|
| 5 |
+
- NER
|
| 6 |
+
- camembert
|
| 7 |
+
- literary-texts
|
| 8 |
+
- nested-entities
|
| 9 |
+
- BookNLP-fr
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
metrics:
|
| 12 |
+
- f1
|
| 13 |
+
- precision
|
| 14 |
+
- recall
|
| 15 |
+
base_model:
|
| 16 |
+
- almanach/camembert-large
|
| 17 |
+
pipeline_tag: token-classification
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## INTRODUCTION:
|
| 21 |
+
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.
|
| 22 |
+
|
| 23 |
+
The predicted entities are:
|
| 24 |
+
- 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, ...)
|
| 25 |
+
- facilities (FAC): chatêau, sentier, chambre, couloir, ...
|
| 26 |
+
- time (TIME): le règne de Louis XIV, ce matin, en juillet, ...
|
| 27 |
+
- geo-political entities (GPE): Montrouge, France, le petit hameau, ...
|
| 28 |
+
- locations (LOC): le sud, Mars, l'océan, le bois, ...
|
| 29 |
+
- vehicles (VEH): avion, voitures, calèche, vélos, ...
|
| 30 |
+
|
| 31 |
+
## MODEL PERFORMANCES (LOOCV):
|
| 32 |
+
| NER_tag | precision | recall | f1_score | support | support % |
|
| 33 |
+
|-----------|-------------|----------|------------|-----------|-------------|
|
| 34 |
+
| PER | 93.53% | 94.56% | 94.04% | 71,106 | 100.00% |
|
| 35 |
+
| micro_avg | 93.53% | 94.56% | 94.04% | 71,106 | 100.00% |
|
| 36 |
+
| macro_avg | 93.53% | 94.56% | 94.04% | 71,106 | 100.00% |
|
| 37 |
+
|
| 38 |
+
## TRAINING PARAMETERS:
|
| 39 |
+
- Entities types: ['PER']
|
| 40 |
+
- Tagging scheme: BIOES
|
| 41 |
+
- Nested entities levels: [0, 1]
|
| 42 |
+
- Split strategy: Leave-one-out cross-validation (31 files)
|
| 43 |
+
- Train/Validation split: 0.85 / 0.15
|
| 44 |
+
- Batch size: 16
|
| 45 |
+
- Initial learning rate: 0.00014
|
| 46 |
+
|
| 47 |
+
## MODEL ARCHITECTURE:
|
| 48 |
+
Model Input: Maximum context camembert-large embeddings (1024 dimensions)
|
| 49 |
+
|
| 50 |
+
- Locked Dropout: 0.5
|
| 51 |
+
|
| 52 |
+
- Projection layer:
|
| 53 |
+
- layer type: highway layer
|
| 54 |
+
- input: 1024 dimensions
|
| 55 |
+
- output: 2048 dimensions
|
| 56 |
+
|
| 57 |
+
- BiLSTM layer:
|
| 58 |
+
- input: 2048 dimensions
|
| 59 |
+
- output: 256 dimensions (hidden state)
|
| 60 |
+
|
| 61 |
+
- Linear layer:
|
| 62 |
+
- input: 256 dimensions
|
| 63 |
+
- output: 5 dimensions (predicted labels with BIOES tagging scheme)
|
| 64 |
+
|
| 65 |
+
- CRF layer
|
| 66 |
+
|
| 67 |
+
Model Output: BIOES labels sequence
|
| 68 |
+
|
| 69 |
+
## HOW TO USE:
|
| 70 |
+
*** IN CONSTRUCTION ***
|
| 71 |
+
|
| 72 |
+
## TRAINING CORPUS:
|
| 73 |
+
| | Document | Tokens Count | Is included in model eval |
|
| 74 |
+
|----|----------------------------------------------------------------|----------------|------------------------------------|
|
| 75 |
+
| 0 | 1731_Prévost-Antoine-François_Manon-Lescaut_PER-ONLY | 71,219 tokens | True |
|
| 76 |
+
| 1 | 1832_Sand-George_Indiana_PER-ONLY | 112,221 tokens | True |
|
| 77 |
+
| 2 | 1836_Gautier-Theophile_La-morte-amoureuse | 14,293 tokens | True |
|
| 78 |
+
| 3 | 1840_Sand-George_Pauline | 12,407 tokens | True |
|
| 79 |
+
| 4 | 1842_Balzac-Honore-de_La-Maison-du-chat-qui-pelote | 24,776 tokens | True |
|
| 80 |
+
| 5 | 1844_Balzac-Honore-de_La-Maison-Nucingen | 30,034 tokens | True |
|
| 81 |
+
| 6 | 1844_Balzac-Honore-de_Sarrasine | 15,408 tokens | True |
|
| 82 |
+
| 7 | 1856_Cousin-Victor_Madame-de-Hautefort | 11,768 tokens | True |
|
| 83 |
+
| 8 | 1863_Gautier-Theophile_Le-capitaine-Fracasse | 11,855 tokens | True |
|
| 84 |
+
| 9 | 1873_Zola-Emile_Le-ventre-de-Paris | 12,617 tokens | True |
|
| 85 |
+
| 10 | 1881_Flaubert-Gustave_Bouvard-et-Pecuchet | 12,320 tokens | True |
|
| 86 |
+
| 11 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_1-MADEMOISELLE-FIFI | 5,449 tokens | True |
|
| 87 |
+
| 12 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_2-MADAME-BAPTISTE | 2,579 tokens | True |
|
| 88 |
+
| 13 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-1_3-LA-ROUILLE | 2,949 tokens | True |
|
| 89 |
+
| 14 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_1-MARROCA | 4,081 tokens | True |
|
| 90 |
+
| 15 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_2-LA-BUCHE | 2,267 tokens | True |
|
| 91 |
+
| 16 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-2_3-LA-RELIQUE | 2,042 tokens | True |
|
| 92 |
+
| 17 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_1-FOU | 1,906 tokens | True |
|
| 93 |
+
| 18 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_2-REVEIL | 2,160 tokens | True |
|
| 94 |
+
| 19 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_3-UNE-RUSE | 2,470 tokens | True |
|
| 95 |
+
| 20 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_4-A-CHEVAL | 2,880 tokens | True |
|
| 96 |
+
| 21 | 1882_Guy-de-Maupassant_Mademoiselle-Fifi-3_5-UN-REVEILLON | 2,365 tokens | True |
|
| 97 |
+
| 22 | 1901_Lucie-Achard_Rosalie-de-Constant-sa-famille-et-ses-amis | 12,789 tokens | True |
|
| 98 |
+
| 23 | 1903_Conan-Laure_Elisabeth_Seton | 13,054 tokens | True |
|
| 99 |
+
| 24 | 1904_Rolland-Romain_Jean-Christophe_Tome-I-L-aube | 10,982 tokens | True |
|
| 100 |
+
| 25 | 1904_Rolland-Romain_Jean-Christophe_Tome-II-Le-matin | 10,305 tokens | True |
|
| 101 |
+
| 26 | 1917_Adèle-Bourgeois_Némoville | 12,478 tokens | True |
|
| 102 |
+
| 27 | 1923_Delly_Dans-les-ruines | 95,617 tokens | True |
|
| 103 |
+
| 28 | 1923_Radiguet-Raymond_Le-diable-au-corps | 14,860 tokens | True |
|
| 104 |
+
| 29 | 1926_Audoux-Marguerite_De-la-ville-au-moulin | 12,092 tokens | True |
|
| 105 |
+
| 30 | 1937_Audoux-Marguerite_Douce-Lumiere | 12,348 tokens | True |
|
| 106 |
+
| 31 | TOTAL | 554,591 tokens | 31 files used for cross-validation |
|
| 107 |
+
|
| 108 |
+
## PREDICTIONS CONFUSION MATRIX:
|
| 109 |
+
| Gold Labels | PER | O | support |
|
| 110 |
+
|---------------|--------|-------|-----------|
|
| 111 |
+
| PER | 67,239 | 3,867 | 71,106 |
|
| 112 |
+
| O | 4,487 | 0 | 4,487 |
|
| 113 |
+
|
| 114 |
+
## CONTACT:
|
| 115 |
+
mail: antoine [dot] bourgois [at] protonmail [dot] com
|
final_model.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42c6586920956b6fff84a52e91a9b9f23916f0632acce4a96bcbed4b5f240cf6
|
| 3 |
+
size 386227046
|