forked from allenai/allennlp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsemantic_role_labeler.jsonnet
54 lines (53 loc) · 1.34 KB
/
semantic_role_labeler.jsonnet
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
// Configuration for a semantic role labeler model based on:
// He, Luheng et al. “Deep Semantic Role Labeling: What Works and What's Next.” ACL (2017).
{
"dataset_reader":{"type":"srl"},
"train_data_path": std.extVar("SRL_TRAIN_DATA_PATH"),
"validation_data_path": std.extVar("SRL_VALIDATION_DATA_PATH"),
"model": {
"type": "srl",
"text_field_embedder": {
"token_embedders": {
"tokens": {
"type": "embedding",
"embedding_dim": 100,
"pretrained_file": "https://s3-us-west-2.amazonaws.com/allennlp/datasets/glove/glove.6B.100d.txt.gz",
"trainable": true
}
}
},
"initializer": [
[
"tag_projection_layer.*weight",
{
"type": "orthogonal"
}
]
],
"encoder": {
"type": "alternating_lstm",
"input_size": 200,
"hidden_size": 300,
"num_layers": 8,
"recurrent_dropout_probability": 0.1,
"use_highway": true
},
"binary_feature_dim": 100
},
"iterator": {
"type": "bucket",
"sorting_keys": [["tokens", "num_tokens"]],
"batch_size" : 80
},
"trainer": {
"num_epochs": 500,
"grad_clipping": 1.0,
"patience": 20,
"validation_metric": "+f1-measure-overall",
"cuda_device": 0,
"optimizer": {
"type": "adadelta",
"rho": 0.95
}
}
}