-
Notifications
You must be signed in to change notification settings - Fork 147
/
coref_conll.json
150 lines (141 loc) · 3.35 KB
/
coref_conll.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
{
"task_coref":{
"task_description":{
"task_name": "coref",
"validation_metric_name": "coref_f1",
"validation_metric_decreases": false,
"evaluate_on_test": true
},
"data_params":{
"dataset_reader": {
"type": "coref",
"max_span_width": 8,
"token_indexers": {
"tokens": {
"type": "single_id",
"lowercase_tokens": true
},
"token_characters":{
"type": "characters"
},
"elmo": {
"type": "elmo_characters"
}
}
},
"train_data_path":"./data/conll-2012_single_file/train.english.v4_gold_conll",
"validation_data_path": "./data/conll-2012_single_file/dev.english.v4_gold_conll",
"test_data_path": "./data/conll-2012_single_file/test.english.v4_gold_conll",
"datasets_for_vocab_creation": ["train"]
}
},
"model": {
"type": "coref_custom",
"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
}
}
},
"coref": {
"encoder": {
"type": "lstm",
"bidirectional": true,
"input_size": 1188,
"hidden_size": 200,
"num_layers": 1,
"dropout": 0.2
},
"tagger": {
"mention_feedforward": {
"input_dim": 2008,
"num_layers": 2,
"hidden_dims": 150,
"activations": "relu",
"dropout": 0.3
},
"antecedent_feedforward": {
"input_dim": 6044,
"num_layers": 2,
"hidden_dims": 150,
"activations": "relu",
"dropout": 0.3
},
"initializer": [
[".*linear_layers.*weight", {"type": "xavier_normal"}],
[".*scorer._module.weight", {"type": "xavier_normal"}],
["_distance_embedding.weight", {"type": "xavier_normal"}],
["_span_width_embedding.weight", {"type": "xavier_normal"}],
["_context_layer._module.weight_ih.*", {"type": "xavier_normal"}],
["_context_layer._module.weight_hh.*", {"type": "orthogonal"}]
],
"lexical_dropout": 0.5,
"feature_size": 20,
"max_span_width": 8,
"spans_per_word": 0.4,
"max_antecedents": 70,
"eval_on_gold_mentions": false
}
}
},
"iterators": {
"iterator": {
"type": "basic",
"batch_size": 32
},
"iterator_coref": {
"type": "bucket",
"sorting_keys": [["text", "num_tokens"]],
"padding_noise": 0.0,
"batch_size": 1
}
},
"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
}
}
}