syubraj commited on
Commit
6fefe99
·
verified ·
1 Parent(s): b31dbb4

syubraj/espanyol_bert_based_ner

Browse files
Files changed (1) hide show
  1. README.md +19 -67
README.md CHANGED
@@ -7,18 +7,14 @@ tags:
7
  model-index:
8
  - name: fine_tune_bert_output
9
  results: []
10
- language:
11
- - es
12
- metrics:
13
- - precision
14
- - recall
15
- - f1
16
- pipeline_tag: token-classification
17
  ---
18
 
19
- # espanyol_bert_based_ner
 
20
 
21
- This model is a fine-tuned version of [bert-base-multilingual-cased](https://huggingface.co/bert-base-multilingual-cased) on an [wikiann](https://huggingface.co/datasets/unimelb-nlp/wikiann) dataset.
 
 
22
  It achieves the following results on the evaluation set:
23
  - Loss: 0.3320
24
  - Overall Precision: 0.9051
@@ -28,63 +24,19 @@ It achieves the following results on the evaluation set:
28
  - Loc F1: 0.9190
29
  - Org F1: 0.8663
30
  - Per F1: 0.9367
31
- ## Labels
32
- The following table represents the labels used by the model along with their corresponding indices:
33
-
34
- | Index | Label |
35
- |-------|---------|
36
- | 0 | O |
37
- | 1 | B-PER |
38
- | 2 | I-PER |
39
- | 3 | B-ORG |
40
- | 4 | I-ORG |
41
- | 5 | B-LOC |
42
- | 6 | I-LOC |
43
- ### Label Descriptions
44
- - **O**: Outside of a named entity.
45
- - **B-PER**: Beginning of a person's name.
46
- - **I-PER**: Inside a person's name.
47
- - **B-ORG**: Beginning of an organization's name.
48
- - **I-ORG**: Inside an organization's name.
49
- - **B-LOC**: Beginning of a location name.
50
- - **I-LOC**: Inside a location name.
51
-
52
- ## Intended Use
53
- - Text analysis for structured information extraction.
54
- - Applications like document parsing, chatbots, or customer service systems.
55
- ## Inference Example
56
-
57
- ```python
58
- from transformers import AutoModelForTokenClassification, AutoTokenizer, pipeline
59
-
60
- # Load the model and tokenizer
61
- model_name = "syubraj/espanyol_bert_based_ner"
62
- model = AutoModelForTokenClassification.from_pretrained(model_name)
63
- tokenizer = AutoTokenizer.from_pretrained(model_name)
64
-
65
- # The custom label mapping
66
- custom_label_mapping = {
67
- 0: 'O',
68
- 1: 'B-PER',
69
- 2: 'I-PER',
70
- 3: 'B-ORG',
71
- 4: 'I-ORG',
72
- 5: 'B-LOC',
73
- 6: 'I-LOC',
74
- }
75
- ner_pipeline = pipeline("ner", model=model, tokenizer=tokenizer)
76
-
77
- # Sample Spanish text
78
- text = "Donald trabaja en Twitter"
79
-
80
- raw_results = ner_pipeline(text)
81
-
82
- for entity in raw_results:
83
- label_index = int(entity['entity'].split('_')[1])
84
- entity_label = custom_label_mapping.get(label_index, "UNKNOWN")
85
- print(f"Word: {entity['word']}, Label: {entity_label}")
86
-
87
- ```
88
  ## Training procedure
89
 
90
  ### Training hyperparameters
@@ -121,4 +73,4 @@ The following hyperparameters were used during training:
121
  - Transformers 4.44.2
122
  - Pytorch 2.4.1+cu121
123
  - Datasets 3.2.0
124
- - Tokenizers 0.19.1
 
7
  model-index:
8
  - name: fine_tune_bert_output
9
  results: []
 
 
 
 
 
 
 
10
  ---
11
 
12
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
+ should probably proofread and complete it, then remove this comment. -->
14
 
15
+ # fine_tune_bert_output
16
+
17
+ This model is a fine-tuned version of [bert-base-multilingual-cased](https://huggingface.co/bert-base-multilingual-cased) on an unknown dataset.
18
  It achieves the following results on the evaluation set:
19
  - Loss: 0.3320
20
  - Overall Precision: 0.9051
 
24
  - Loc F1: 0.9190
25
  - Org F1: 0.8663
26
  - Per F1: 0.9367
27
+
28
+ ## Model description
29
+
30
+ More information needed
31
+
32
+ ## Intended uses & limitations
33
+
34
+ More information needed
35
+
36
+ ## Training and evaluation data
37
+
38
+ More information needed
39
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  ## Training procedure
41
 
42
  ### Training hyperparameters
 
73
  - Transformers 4.44.2
74
  - Pytorch 2.4.1+cu121
75
  - Datasets 3.2.0
76
+ - Tokenizers 0.19.1