Compare commits
No commits in common. "8f3abc1ef81ffbbb0e80568d4fed1dd10d459548" and "385536886365fc9764f9e9251e924ad5dc96c34c" have entirely different histories.
8f3abc1ef8
...
3855368863
|
@ -25,4 +25,3 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
|
|
23
README.md
23
README.md
|
@ -6,20 +6,10 @@ widget:
|
|||
- text: "My name is jean-baptiste and I live in montreal"
|
||||
- text: "My name is clara and I live in berkeley, california."
|
||||
- text: "My name is wolfgang and I live in berlin"
|
||||
train-eval-index:
|
||||
- config: conll2003
|
||||
task: token-classification
|
||||
task_id: entity_extraction
|
||||
splits:
|
||||
eval_split: validation
|
||||
col_mapping:
|
||||
tokens: tokens
|
||||
ner_tags: tags
|
||||
license: mit
|
||||
|
||||
---
|
||||
|
||||
# roberta-large-ner-english: model fine-tuned from roberta-large for NER task
|
||||
# roberta-large-ner: model fine-tuned from roberta-large for NER task
|
||||
|
||||
## Introduction
|
||||
|
||||
|
@ -47,15 +37,15 @@ Train | Validation
|
|||
-|-
|
||||
17494 | 3250
|
||||
|
||||
## How to use roberta-large-ner-english with HuggingFace
|
||||
## How to use camembert-ner with HuggingFace
|
||||
|
||||
##### Load roberta-large-ner-english and its sub-word tokenizer :
|
||||
##### Load camembert-ner and its sub-word tokenizer :
|
||||
|
||||
```python
|
||||
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained("Jean-Baptiste/roberta-large-ner-english")
|
||||
model = AutoModelForTokenClassification.from_pretrained("Jean-Baptiste/roberta-large-ner-english")
|
||||
tokenizer = AutoTokenizer.from_pretrained("Jean-Baptiste/roberta-large-ner")
|
||||
model = AutoModelForTokenClassification.from_pretrained("Jean-Baptiste/roberta-large-ner")
|
||||
|
||||
|
||||
##### Process text sample (from wikipedia)
|
||||
|
@ -129,6 +119,3 @@ ORG|0.7655|0.6437|0.6993
|
|||
LOC|0.8727|0.6180|0.7236
|
||||
|
||||
|
||||
|
||||
For those who could be interested, here is a short article on how I used the results of this model to train a LSTM model for signature detection in emails:
|
||||
https://medium.com/@jean-baptiste.polle/lstm-model-for-email-signature-detection-8e990384fefa
|
||||
|
|
16
config.json
16
config.json
|
@ -12,19 +12,19 @@
|
|||
"hidden_size": 1024,
|
||||
"id2label": {
|
||||
"0": "O",
|
||||
"1": "PER",
|
||||
"2": "ORG",
|
||||
"3": "LOC",
|
||||
"4": "MISC"
|
||||
"1": "LOC",
|
||||
"2": "PER",
|
||||
"3": "MISC",
|
||||
"4": "ORG"
|
||||
},
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 4096,
|
||||
"label2id": {
|
||||
"LOC": 3,
|
||||
"MISC": 4,
|
||||
"LOC": 1,
|
||||
"MISC": 3,
|
||||
"O": 0,
|
||||
"ORG": 2,
|
||||
"PER": 1
|
||||
"ORG": 4,
|
||||
"PER": 2
|
||||
},
|
||||
"layer_norm_eps": 1e-05,
|
||||
"max_position_embeddings": 514,
|
||||
|
|
BIN
model.onnx (Stored with Git LFS)
BIN
model.onnx (Stored with Git LFS)
Binary file not shown.
BIN
model.safetensors (Stored with Git LFS)
BIN
model.safetensors (Stored with Git LFS)
Binary file not shown.
BIN
pytorch_model.bin (Stored with Git LFS)
BIN
pytorch_model.bin (Stored with Git LFS)
Binary file not shown.
10
results.csv
10
results.csv
|
@ -1,6 +1,6 @@
|
|||
,precision,recall,f1,entity
|
||||
0,0.9904511030622325,0.9925754825936314,0.9915121549237741,PER
|
||||
1,0.9628323385784048,0.969672131147541,0.966240130683365,ORG
|
||||
2,0.974924221548636,0.9725123694337549,0.9737168019815605,LOC
|
||||
3,0.9308278867102396,0.9203015616585891,0.925534795559166,MISC
|
||||
4,0.9728188879121981,0.9734490010515248,0.9731265700746845,Overall
|
||||
0,0.9795249795249795,0.9862561847168774,0.9828790576633339,LOC
|
||||
1,0.9914318668643928,0.9927404718693285,0.9920857378400659,PER
|
||||
2,0.9292274446245273,0.9262250942380184,0.9277238403451995,MISC
|
||||
3,0.9627007895453308,0.966120218579235,0.9644074730669576,ORG
|
||||
4,0.9740825890497252,0.9766692954784437,0.9753719894698967,Overall
|
||||
|
|
|
BIN
tf_model.h5 (Stored with Git LFS)
BIN
tf_model.h5 (Stored with Git LFS)
Binary file not shown.
Loading…
Reference in New Issue