-
Notifications
You must be signed in to change notification settings - Fork 147
/
ner.json
120 lines (112 loc) · 2.44 KB
/
ner.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
"task_ner":{
"task_description":{
"task_name": "ner",
"validation_metric_name": "f1-measure-overall",
"validation_metric_decreases": false,
"evaluate_on_test": true
},
"data_params":{
"dataset_reader":{
"type": "ner_ontonotes",
"label_namespace": "ontonotes_ner_labels",
"coding_scheme": "BIOUL",
"lazy": false,
"token_indexers": {
"tokens": {
"type": "single_id",
"lowercase_tokens": true
},
"token_characters":{
"type": "characters"
},
"elmo": {
"type": "elmo_characters"
}
}
},
"train_data_path": "./data/conll-2012/v4/data/train/",
"validation_data_path": "./data/conll-2012/v4/data/development/",
"test_data_path": "./data/conll-2012/v4/data/test/",
"datasets_for_vocab_creation": ["train"]
}
},
"model": {
"type": "ner",
"text_field_embedder": {
"token_embedders": {
"tokens": {
"type": "embedding",
"pretrained_file": "./data/glove/glove.6B.100d.txt.gz",
"embedding_dim": 100,
"trainable": true
},
"elmo": {
"type": "elmo_token_embedder",
"options_file": "./data/elmo/2x4096_512_2048cnn_2xhighway_options.json",
"weight_file": "./data/elmo/2x4096_512_2048cnn_2xhighway_weights.hdf5",
"do_layer_norm": false,
"dropout": 0,
"requires_grad": false
},
"token_characters": {
"type": "character_encoding",
"embedding": {
"embedding_dim": 16
},
"encoder": {
"type": "cnn",
"embedding_dim": 16,
"num_filters": 64,
"ngram_filter_sizes": [3]
},
"dropout": 0.1
}
}
},
"ner": {
"encoder": {
"type": "lstm",
"bidirectional": true,
"input_size": 1188,
"hidden_size": 64,
"num_layers": 2,
"dropout": 0.2
},
"tagger": {
"label_namespace": "ontonotes_ner_labels",
"constraint_type": "BIOUL",
"dropout": 0.2
}
}
},
"iterators": {
"iterator": {
"type": "basic",
"batch_size": 32
}
},
"multi_task_trainer": {
"type": "sampler_multi_task_trainer",
"sampling_method": "proportional",
"patience": 10,
"num_epochs": 100,
"min_lr": "1e-7",
"grad_norm": 5.0,
"grad_clipping": 10.0,
"cuda_device": 0,
"optimizer": {
"type": "adam",
"lr": 0.001
},
"scheduler": {
"type": "reduce_on_plateau",
"mode": "min",
"factor": 0.5,
"patience": 5,
"threshold": 0.0001,
"threshold_mode": "abs",
"verbose": true
}
}
}