julien-c HF staff commited on
Commit
20dcf94
1 Parent(s): 216aff5

Migrate model card from transformers-repo

Browse files

Read announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755
Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/gilf/french-camembert-postag-model/README.md

Files changed (1) hide show
  1. README.md +96 -0
README.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: fr
3
+ widget:
4
+ - text: "Face à un choc inédit, les mesures mises en place par le gouvernement ont permis une protection forte et efficace des ménages"
5
+ ---
6
+
7
+ ## About
8
+
9
+ The *french-camembert-postag-model* is a part of speech tagging model for French that was trained on the *free-french-treebank* dataset available on
10
+ [github](https://github.com/nicolashernandez/free-french-treebank). The base tokenizer and model used for training is *'camembert-base'*.
11
+
12
+ ## Supported Tags
13
+
14
+ It uses the following tags:
15
+
16
+ | Tag | Category | Extra Info |
17
+ |----------|:------------------------------:|------------:|
18
+ | ADJ | adjectif | |
19
+ | ADJWH | adjectif | |
20
+ | ADV | adverbe | |
21
+ | ADVWH | adverbe | |
22
+ | CC | conjonction de coordination | |
23
+ | CLO | pronom | obj |
24
+ | CLR | pronom | refl |
25
+ | CLS | pronom | suj |
26
+ | CS | conjonction de subordination | |
27
+ | DET | déterminant | |
28
+ | DETWH | déterminant | |
29
+ | ET | mot étranger | |
30
+ | I | interjection | |
31
+ | NC | nom commun | |
32
+ | NPP | nom propre | |
33
+ | P | préposition | |
34
+ | P+D | préposition + déterminant | |
35
+ | PONCT | signe de ponctuation | |
36
+ | PREF | préfixe | |
37
+ | PRO | autres pronoms | |
38
+ | PROREL | autres pronoms | rel |
39
+ | PROWH | autres pronoms | int |
40
+ | U | ? | |
41
+ | V | verbe | |
42
+ | VIMP | verbe imperatif | |
43
+ | VINF | verbe infinitif | |
44
+ | VPP | participe passé | |
45
+ | VPR | participe présent | |
46
+ | VS | subjonctif | |
47
+
48
+ More information on the tags can be found here:
49
+
50
+ http://alpage.inria.fr/statgram/frdep/Publications/crabbecandi-taln2008-final.pdf
51
+
52
+ ## Usage
53
+
54
+ The usage of this model follows the common transformers patterns. Here is a short example of its usage:
55
+
56
+ ```python
57
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
58
+
59
+ tokenizer = AutoTokenizer.from_pretrained("gilf/french-camembert-postag-model")
60
+ model = AutoModelForTokenClassification.from_pretrained("gilf/french-camembert-postag-model")
61
+
62
+ from transformers import pipeline
63
+
64
+ nlp_token_class = pipeline('ner', model=model, tokenizer=tokenizer, grouped_entities=True)
65
+
66
+ nlp_token_class('Face à un choc inédit, les mesures mises en place par le gouvernement ont permis une protection forte et efficace des ménages')
67
+ ```
68
+
69
+ The lines above would display something like this on a Jupyter notebook:
70
+
71
+ ```
72
+ [{'entity_group': 'NC', 'score': 0.5760144591331482, 'word': '<s>'},
73
+ {'entity_group': 'U', 'score': 0.9946700930595398, 'word': 'Face'},
74
+ {'entity_group': 'P', 'score': 0.999615490436554, 'word': 'à'},
75
+ {'entity_group': 'DET', 'score': 0.9995906352996826, 'word': 'un'},
76
+ {'entity_group': 'NC', 'score': 0.9995531439781189, 'word': 'choc'},
77
+ {'entity_group': 'ADJ', 'score': 0.999183714389801, 'word': 'inédit'},
78
+ {'entity_group': 'P', 'score': 0.3710663616657257, 'word': ','},
79
+ {'entity_group': 'DET', 'score': 0.9995903968811035, 'word': 'les'},
80
+ {'entity_group': 'NC', 'score': 0.9995649456977844, 'word': 'mesures'},
81
+ {'entity_group': 'VPP', 'score': 0.9988670349121094, 'word': 'mises'},
82
+ {'entity_group': 'P', 'score': 0.9996246099472046, 'word': 'en'},
83
+ {'entity_group': 'NC', 'score': 0.9995329976081848, 'word': 'place'},
84
+ {'entity_group': 'P', 'score': 0.9996233582496643, 'word': 'par'},
85
+ {'entity_group': 'DET', 'score': 0.9995935559272766, 'word': 'le'},
86
+ {'entity_group': 'NC', 'score': 0.9995369911193848, 'word': 'gouvernement'},
87
+ {'entity_group': 'V', 'score': 0.9993771314620972, 'word': 'ont'},
88
+ {'entity_group': 'VPP', 'score': 0.9991101026535034, 'word': 'permis'},
89
+ {'entity_group': 'DET', 'score': 0.9995885491371155, 'word': 'une'},
90
+ {'entity_group': 'NC', 'score': 0.9995636343955994, 'word': 'protection'},
91
+ {'entity_group': 'ADJ', 'score': 0.9991781711578369, 'word': 'forte'},
92
+ {'entity_group': 'CC', 'score': 0.9991298317909241, 'word': 'et'},
93
+ {'entity_group': 'ADJ', 'score': 0.9992275238037109, 'word': 'efficace'},
94
+ {'entity_group': 'P+D', 'score': 0.9993300437927246, 'word': 'des'},
95
+ {'entity_group': 'NC', 'score': 0.8353511393070221, 'word': 'ménages</s>'}]
96
+ ```