Initial commit with adapted deliverables from Clarin: http://hdl.handle.net/20.500.12537/301
4f09c24
{ | |
"dataset_reader": { | |
"type": "conllu", | |
"features": [ | |
"token", | |
"char" | |
], | |
"lemma_indexers": { | |
"char": { | |
"type": "characters_const_padding", | |
"character_tokenizer": { | |
"end_tokens": [ | |
"__END__" | |
], | |
"start_tokens": [ | |
"__START__" | |
] | |
}, | |
"min_padding_length": 32, | |
"namespace": "lemma_characters" | |
} | |
}, | |
"targets": [ | |
"deprel", | |
"feats", | |
"head", | |
"lemma", | |
"upostag", | |
"xpostag" | |
], | |
"token_indexers": { | |
"char": { | |
"type": "characters_const_padding", | |
"character_tokenizer": { | |
"end_tokens": [ | |
"__END__" | |
], | |
"start_tokens": [ | |
"__START__" | |
] | |
}, | |
"min_padding_length": 32 | |
}, | |
"feats": { | |
"type": "feats_indexer" | |
}, | |
"lemma": { | |
"type": "characters_const_padding", | |
"character_tokenizer": { | |
"end_tokens": [ | |
"__END__" | |
], | |
"start_tokens": [ | |
"__START__" | |
] | |
}, | |
"min_padding_length": 32 | |
}, | |
"token": { | |
"type": "pretrained_transformer_mismatched_fixed", | |
"model_name": "transformer_models/electra-base-igc-is/", | |
"tokenizer_kwargs": {} | |
}, | |
"upostag": { | |
"type": "single_id", | |
"feature_name": "pos_", | |
"namespace": "upostag" | |
}, | |
"xpostag": { | |
"type": "single_id", | |
"feature_name": "tag_", | |
"namespace": "xpostag" | |
} | |
}, | |
"use_sem": false | |
}, | |
"model": { | |
"type": "semantic_multitask", | |
"dependency_relation": { | |
"type": "combo_dependency_parsing_from_vocab", | |
"dependency_projection_layer": { | |
"activation": "tanh", | |
"dropout_rate": 0.25, | |
"in_features": 1024, | |
"out_features": 128 | |
}, | |
"head_predictor": { | |
"cycle_loss_n": 0, | |
"dependency_projection_layer": { | |
"activation": "tanh", | |
"in_features": 1024, | |
"out_features": 512 | |
}, | |
"head_projection_layer": { | |
"activation": "tanh", | |
"in_features": 1024, | |
"out_features": 512 | |
} | |
}, | |
"head_projection_layer": { | |
"activation": "tanh", | |
"dropout_rate": 0.25, | |
"in_features": 1024, | |
"out_features": 128 | |
}, | |
"vocab_namespace": "deprel_labels" | |
}, | |
"lemmatizer": { | |
"type": "combo_lemma_predictor_from_vocab", | |
"activations": [ | |
"relu", | |
"relu", | |
"relu", | |
"linear" | |
], | |
"char_vocab_namespace": "token_characters", | |
"dilation": [ | |
1, | |
2, | |
4, | |
1 | |
], | |
"embedding_dim": 256, | |
"filters": [ | |
256, | |
256, | |
256 | |
], | |
"input_projection_layer": { | |
"activation": "tanh", | |
"dropout_rate": 0.25, | |
"in_features": 1024, | |
"out_features": 32 | |
}, | |
"kernel_size": [ | |
3, | |
3, | |
3, | |
1 | |
], | |
"lemma_vocab_namespace": "lemma_characters", | |
"padding": [ | |
1, | |
2, | |
4, | |
0 | |
], | |
"stride": [ | |
1, | |
1, | |
1, | |
1 | |
] | |
}, | |
"loss_weights": { | |
"deprel": 0.8, | |
"feats": 0.2, | |
"head": 0.2, | |
"lemma": 0.05, | |
"semrel": 0.05, | |
"upostag": 0.05, | |
"xpostag": 0.05 | |
}, | |
"morphological_feat": { | |
"type": "combo_morpho_from_vocab", | |
"activations": [ | |
"tanh", | |
"linear" | |
], | |
"dropout": [ | |
0.25, | |
0 | |
], | |
"hidden_dims": [ | |
128 | |
], | |
"input_dim": 1024, | |
"num_layers": 2, | |
"vocab_namespace": "feats_labels" | |
}, | |
"regularizer": { | |
"regexes": [ | |
[ | |
".*conv1d.*", | |
{ | |
"alpha": 1e-06, | |
"type": "l2" | |
} | |
], | |
[ | |
".*forward.*", | |
{ | |
"alpha": 1e-06, | |
"type": "l2" | |
} | |
], | |
[ | |
".*backward.*", | |
{ | |
"alpha": 1e-06, | |
"type": "l2" | |
} | |
], | |
[ | |
".*char_embed.*", | |
{ | |
"alpha": 1e-05, | |
"type": "l2" | |
} | |
] | |
] | |
}, | |
"seq_encoder": { | |
"type": "combo_encoder", | |
"layer_dropout_probability": 0.33, | |
"stacked_bilstm": { | |
"hidden_size": 512, | |
"input_size": 164, | |
"layer_dropout_probability": 0.33, | |
"num_layers": 2, | |
"recurrent_dropout_probability": 0.33 | |
} | |
}, | |
"text_field_embedder": { | |
"type": "basic", | |
"token_embedders": { | |
"char": { | |
"type": "char_embeddings_from_config", | |
"dilated_cnn_encoder": { | |
"activations": [ | |
"relu", | |
"relu", | |
"linear" | |
], | |
"dilation": [ | |
1, | |
2, | |
4 | |
], | |
"filters": [ | |
512, | |
256, | |
64 | |
], | |
"input_dim": 64, | |
"kernel_size": [ | |
3, | |
3, | |
3 | |
], | |
"padding": [ | |
1, | |
2, | |
4 | |
], | |
"stride": [ | |
1, | |
1, | |
1 | |
] | |
}, | |
"embedding_dim": 64 | |
}, | |
"token": { | |
"type": "transformers_word_embeddings", | |
"model_name": "transformer_models/electra-base-igc-is/", | |
"projection_dim": 100 | |
} | |
} | |
}, | |
"upos_tagger": { | |
"activations": [ | |
"tanh", | |
"linear" | |
], | |
"dropout": [ | |
0.25, | |
0 | |
], | |
"hidden_dims": [ | |
64 | |
], | |
"input_dim": 1024, | |
"num_layers": 2, | |
"vocab_namespace": "upostag_labels" | |
}, | |
"xpos_tagger": { | |
"activations": [ | |
"tanh", | |
"linear" | |
], | |
"dropout": [ | |
0.25, | |
0 | |
], | |
"hidden_dims": [ | |
128 | |
], | |
"input_dim": 1024, | |
"num_layers": 2, | |
"vocab_namespace": "xpostag_labels" | |
} | |
}, | |
"train_data_path": "is_combined-ud-train.conllu", | |
"validation_data_path": "is_combined-ud-dev.conllu", | |
"trainer": { | |
"type": "gradient_descent_validate_n", | |
"checkpointer": { | |
"type": "finishing_only_checkpointer" | |
}, | |
"cuda_device": 0, | |
"epoch_callbacks": [ | |
{ | |
"type": "transfer_patience" | |
} | |
], | |
"grad_clipping": 5, | |
"learning_rate_scheduler": { | |
"type": "combo_scheduler" | |
}, | |
"num_epochs": 400, | |
"optimizer": { | |
"type": "adam", | |
"betas": [ | |
0.9, | |
0.9 | |
], | |
"lr": 0.002 | |
}, | |
"patience": 1, | |
"validation_metric": "+EM" | |
}, | |
"vocabulary": { | |
"type": "from_instances_extended", | |
"non_padded_namespaces": [ | |
"head_labels" | |
], | |
"only_include_pretrained_words": true, | |
"oov_token": "_", | |
"padding_token": "__PAD__" | |
}, | |
"type": "default", | |
"data_loader": { | |
"batch_sampler": { | |
"type": "token_count", | |
"word_batch_size": 2500 | |
} | |
}, | |
"datasets_for_vocab_creation": [ | |
"train" | |
], | |
"numpy_seed": 8787, | |
"pytorch_seed": 8787, | |
"random_seed": 8787 | |
} | |