ophelielacroix commited on
Commit
fe333e8
1 Parent(s): 3ec8f25

initial commit

Browse files
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - da
4
+ tags:
5
+ - ner
6
+ - bert
7
+ - pytorch
8
+ - transformers
9
+ license: CC BY-SA 4.0
10
+ datasets:
11
+ - DaNE
12
+ metrics:
13
+ - f1
14
+ widget:
15
+ - text: "Jens Peter Hansen kommer fra Danmark"
16
+ ---
17
+
18
+ # BERT fine-tuned for Named Entity Recognition in Danish
19
+
20
+ The model tags tokens (in Danish sentences) with named entity tags (BIO format) [PER, ORG, LOC, MISC].
21
+ The pretrained language model used for fine-tuning is the [Danish BERT](https://github.com/certainlyio/nordic_bert) by BotXO.
22
+
23
+ See the [DaNLP documentation](https://danlp-alexandra.readthedocs.io/en/latest/docs/tasks/ner.html#bert) for more details.
24
+
25
+ Here is how to use the model:
26
+
27
+ ```python
28
+ from transformers import BertTokenizer, BertForTokenClassification
29
+
30
+ model = BertForTokenClassification.from_pretrained("DaNLP/da-bert-ner")
31
+ tokenizer = BertTokenizer.from_pretrained("DaNLP/da-bert-ner")
32
+ ```
33
+
34
+ ## Training Data
35
+
36
+ The model has been trained on the [DaNE](https://danlp-alexandra.readthedocs.io/en/latest/docs/datasets.html#dane).
37
+
38
+
39
+
40
+
41
+
42
+
added_tokens.json ADDED
@@ -0,0 +1 @@
 
1
+ {}
config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": ".",
3
+ "architectures": [
4
+ "BertForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "directionality": "bidi",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "O",
14
+ "1": "B-MISC",
15
+ "2": "I-MISC",
16
+ "3": "B-PER",
17
+ "4": "I-PER",
18
+ "5": "B-ORG",
19
+ "6": "I-ORG",
20
+ "7": "B-LOC",
21
+ "8": "I-LOC"
22
+ },
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 3072,
25
+ "label2id": {
26
+ "B-LOC": 7,
27
+ "B-MISC": 1,
28
+ "B-ORG": 5,
29
+ "B-PER": 3,
30
+ "I-LOC": 8,
31
+ "I-MISC": 2,
32
+ "I-ORG": 6,
33
+ "I-PER": 4,
34
+ "O": 0
35
+ },
36
+ "layer_norm_eps": 1e-12,
37
+ "max_position_embeddings": 512,
38
+ "model_type": "bert",
39
+ "num_attention_heads": 12,
40
+ "num_hidden_layers": 12,
41
+ "output_past": true,
42
+ "pad_token_id": 0,
43
+ "pooler_fc_size": 768,
44
+ "pooler_num_attention_heads": 12,
45
+ "pooler_num_fc_layers": 3,
46
+ "pooler_size_per_head": 128,
47
+ "pooler_type": "first_token_transform",
48
+ "type_vocab_size": 2,
49
+ "vocab_size": 32000
50
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d5168a7eaef0e4fca20692c5f0aee87d248ee91074724861e2fb7dda4a141f3
3
+ size 440220471
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b9ad48a206924a20c79d0263bcd1dfaf292be83216d8c7423b146a10eadadc4
3
+ size 442767148
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"do_lower_case": true, "init_inputs": []}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff