This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
dependency_parser.json
64 lines (62 loc) · 1.86 KB
/
dependency_parser.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
{
"dataset_reader":{
"type":"universal_dependencies"
},
"train_data_path": std.extVar("PTB_DEPENDENCIES_TRAIN"),
"validation_data_path": std.extVar("PTB_DEPENDENCIES_VAL"),
"model": {
"type": "biaffine_parser",
"text_field_embedder": {
"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,
"sparse": true
}
},
"pos_tag_embedding":{
"embedding_dim": 100,
"vocab_namespace": "pos",
"sparse": true
},
"encoder": {
"type": "stacked_bidirectional_lstm",
"input_size": 200,
"hidden_size": 400,
"num_layers": 3,
"recurrent_dropout_probability": 0.3,
"use_highway": true
},
"use_mst_decoding_for_validation": false,
"arc_representation_dim": 500,
"tag_representation_dim": 100,
"dropout": 0.3,
"input_dropout": 0.3,
"initializer": [
[".*projection.*weight", {"type": "xavier_uniform"}],
[".*projection.*bias", {"type": "zero"}],
[".*tag_bilinear.*weight", {"type": "xavier_uniform"}],
[".*tag_bilinear.*bias", {"type": "zero"}],
[".*weight_ih.*", {"type": "xavier_uniform"}],
[".*weight_hh.*", {"type": "orthogonal"}],
[".*bias_ih.*", {"type": "zero"}],
[".*bias_hh.*", {"type": "lstm_hidden_bias"}]]
},
"iterator": {
"type": "bucket",
"sorting_keys": [["words", "num_tokens"]],
"batch_size" : 128
},
"trainer": {
"num_epochs": 50,
"grad_norm": 5.0,
"patience": 50,
"cuda_device": 0,
"validation_metric": "+LAS",
"optimizer": {
"type": "dense_sparse_adam",
"betas": [0.9, 0.9]
}
}
}