Skip to content

Instantly share code, notes, and snippets.

@dimidd
Created April 25, 2018 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimidd/6a8e74e8a88b475c680108da41861f47 to your computer and use it in GitHub Desktop.
Save dimidd/6a8e74e8a88b475c680108da41861f47 to your computer and use it in GitHub Desktop.
{
"dataset_reader": {
"type": "conll2003",
"tag_label": "ner",
"token_indexers": {
"tokens": {
"type": "single_id",
"lowercase_tokens": true
},
"token_characters": {
"type": "characters"
}
}
},
"train_data_path": "~/test_allen/eng.train",
"validation_data_path": "~/test_allen/eng.testa",
"test_data_path": "~/test_allen/eng.testb",
"evaluate_on_test": true,
"model": {
"type": "crf_tagger",
"text_field_embedder": {
"tokens": {
"type": "embedding",
"embedding_dim": 50,
"pretrained_file": "https://s3-us-west-2.amazonaws.com/allennlp/datasets/glove/glove.6B.50d.txt.gz",
"trainable": true
},
"token_characters": {
"type": "character_encoding",
"embedding": {
"embedding_dim": 25
},
"encoder": {
"type": "gru",
"input_size": 25,
"hidden_size": 80,
"num_layers": 2,
"dropout": 0.25,
"bidirectional": true
}
}
},
"encoder": {
"type": "gru",
"input_size": 210,
"hidden_size": 300,
"num_layers": 2,
"dropout": 0.5,
"bidirectional": true
},
"regularizer": [
[
"transitions$",
{
"type": "l2",
"alpha": 0.01
}
]
]
},
"iterator": {
"type": "basic",
"batch_size": 32
},
"trainer": {
"optimizer": "adam",
"num_epochs": 50,
"patience": 10,
"cuda_device": -1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment