ianroberts commited on
Commit
9fb26d1
1 Parent(s): 2be6cea

Fix config to use the correct B/I/O label names

Browse files

Token labels were previously configured as generic LABEL_0 to LABEL_8; changed to the correct B/I/O tags so transformers ner pipeline can correctly aggregate the tokens into chunks.

Files changed (2) hide show
  1. config.json +18 -18
  2. onnx/config.json +18 -18
config.json CHANGED
@@ -9,27 +9,27 @@
9
  "dropout": 0.1,
10
  "hidden_dim": 3072,
11
  "id2label": {
12
- "0": "LABEL_0",
13
- "1": "LABEL_1",
14
- "2": "LABEL_2",
15
- "3": "LABEL_3",
16
- "4": "LABEL_4",
17
- "5": "LABEL_5",
18
- "6": "LABEL_6",
19
- "7": "LABEL_7",
20
- "8": "LABEL_8"
21
  },
22
  "initializer_range": 0.02,
23
  "label2id": {
24
- "LABEL_0": 0,
25
- "LABEL_1": 1,
26
- "LABEL_2": 2,
27
- "LABEL_3": 3,
28
- "LABEL_4": 4,
29
- "LABEL_5": 5,
30
- "LABEL_6": 6,
31
- "LABEL_7": 7,
32
- "LABEL_8": 8
33
  },
34
  "max_position_embeddings": 512,
35
  "model_type": "distilbert",
 
9
  "dropout": 0.1,
10
  "hidden_dim": 3072,
11
  "id2label": {
12
+ "0": "O",
13
+ "1": "B-PER",
14
+ "2": "I-PER",
15
+ "3": "B-ORG",
16
+ "4": "I-ORG",
17
+ "5": "B-LOC",
18
+ "6": "I-LOC",
19
+ "7": "B-MISC",
20
+ "8": "I-MISC"
21
  },
22
  "initializer_range": 0.02,
23
  "label2id": {
24
+ "O": 0,
25
+ "B-PER": 1,
26
+ "I-PER": 2,
27
+ "B-ORG": 3,
28
+ "I-ORG": 4,
29
+ "B-LOC": 5,
30
+ "I-LOC": 6,
31
+ "B-MISC": 7,
32
+ "I-MISC": 8
33
  },
34
  "max_position_embeddings": 512,
35
  "model_type": "distilbert",
onnx/config.json CHANGED
@@ -9,27 +9,27 @@
9
  "dropout": 0.1,
10
  "hidden_dim": 3072,
11
  "id2label": {
12
- "0": "LABEL_0",
13
- "1": "LABEL_1",
14
- "2": "LABEL_2",
15
- "3": "LABEL_3",
16
- "4": "LABEL_4",
17
- "5": "LABEL_5",
18
- "6": "LABEL_6",
19
- "7": "LABEL_7",
20
- "8": "LABEL_8"
21
  },
22
  "initializer_range": 0.02,
23
  "label2id": {
24
- "LABEL_0": 0,
25
- "LABEL_1": 1,
26
- "LABEL_2": 2,
27
- "LABEL_3": 3,
28
- "LABEL_4": 4,
29
- "LABEL_5": 5,
30
- "LABEL_6": 6,
31
- "LABEL_7": 7,
32
- "LABEL_8": 8
33
  },
34
  "max_position_embeddings": 512,
35
  "model_type": "distilbert",
 
9
  "dropout": 0.1,
10
  "hidden_dim": 3072,
11
  "id2label": {
12
+ "0": "O",
13
+ "1": "B-PER",
14
+ "2": "I-PER",
15
+ "3": "B-ORG",
16
+ "4": "I-ORG",
17
+ "5": "B-LOC",
18
+ "6": "I-LOC",
19
+ "7": "B-MISC",
20
+ "8": "I-MISC"
21
  },
22
  "initializer_range": 0.02,
23
  "label2id": {
24
+ "O": 0,
25
+ "B-PER": 1,
26
+ "I-PER": 2,
27
+ "B-ORG": 3,
28
+ "I-ORG": 4,
29
+ "B-LOC": 5,
30
+ "I-LOC": 6,
31
+ "B-MISC": 7,
32
+ "I-MISC": 8
33
  },
34
  "max_position_embeddings": 512,
35
  "model_type": "distilbert",