-
-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update NEL emerson config options (#207)
* remove ner from pipeline * fix scoring weights * two configs, one with entity_ruler and one with ner * add config with NEL only, training should work with this * restore pipeline creation * restore vectors_model * revert change to benchmark EL project
- Loading branch information
Showing
4 changed files
with
299 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
[paths] | ||
train = "" | ||
dev = "" | ||
raw = null | ||
init_tok2vec = null | ||
kb = "" | ||
base_nlp = "" | ||
vectors = "${paths.base_nlp}" | ||
|
||
[system] | ||
seed = 342 | ||
gpu_allocator = null | ||
|
||
[nlp] | ||
lang = "en" | ||
pipeline = ["sentencizer","ner","entity_linker"] | ||
disabled = [] | ||
before_creation = null | ||
after_creation = null | ||
after_pipeline_creation = null | ||
tokenizer = {"@tokenizers":"spacy.Tokenizer.v1"} | ||
|
||
[components] | ||
|
||
[components.sentencizer] | ||
factory = "sentencizer" | ||
punct_chars = null | ||
|
||
[components.ner] | ||
source = "${paths.base_nlp}" | ||
component = "ner" | ||
|
||
[components.entity_linker] | ||
factory = "entity_linker" | ||
entity_vector_length = 64 | ||
get_candidates = {"@misc":"spacy.CandidateGenerator.v1"} | ||
incl_context = true | ||
incl_prior = true | ||
labels_discard = [] | ||
use_gold_ents = true | ||
|
||
[components.entity_linker.model] | ||
@architectures = "spacy.EntityLinker.v2" | ||
nO = null | ||
|
||
[components.entity_linker.model.tok2vec] | ||
@architectures = "spacy.HashEmbedCNN.v1" | ||
pretrained_vectors = null | ||
width = 96 | ||
depth = 2 | ||
embed_size = 2000 | ||
window_size = 1 | ||
maxout_pieces = 3 | ||
subword_features = true | ||
|
||
[initialize] | ||
vectors = ${paths.vectors} | ||
init_tok2vec = ${paths.init_tok2vec} | ||
vocab_data = null | ||
lookups = null | ||
|
||
[initialize.components] | ||
|
||
[initialize.components.entity_linker] | ||
|
||
[initialize.components.entity_linker.kb_loader] | ||
@misc = "spacy.KBFromFile.v1" | ||
kb_path = ${paths.kb} | ||
|
||
[initialize.tokenizer] | ||
|
||
|
||
[corpora] | ||
|
||
[corpora.train] | ||
@readers = "MyCorpus.v1" | ||
file = ${paths.train} | ||
|
||
[corpora.dev] | ||
@readers = "MyCorpus.v1" | ||
file = ${paths.dev} | ||
|
||
[training] | ||
train_corpus = "corpora.train" | ||
dev_corpus = "corpora.dev" | ||
seed = ${system.seed} | ||
gpu_allocator = ${system.gpu_allocator} | ||
dropout = 0.2 | ||
patience = 10000 | ||
eval_frequency = 200 | ||
accumulate_gradient = 2 | ||
max_epochs = 0 | ||
max_steps = 600 | ||
frozen_components = ["ner"] | ||
before_to_disk = null | ||
|
||
[training.logger] | ||
@loggers = "spacy.ConsoleLogger.v1" | ||
progress_bar = false | ||
|
||
|
||
[training.batcher] | ||
@batchers = "spacy.batch_by_words.v1" | ||
discard_oversize = false | ||
tolerance = 0.2 | ||
get_length = null | ||
|
||
[training.batcher.size] | ||
@schedules = "compounding.v1" | ||
start = 100 | ||
stop = 1000 | ||
compound = 1.001 | ||
t = 0.0 | ||
|
||
[training.optimizer] | ||
@optimizers = "Adam.v1" | ||
beta1 = 0.9 | ||
beta2 = 0.999 | ||
L2_is_weight_decay = true | ||
L2 = 0.01 | ||
grad_clip = 1.0 | ||
use_averages = false | ||
eps = 0.00000001 | ||
learn_rate = 0.001 | ||
|
||
[training.score_weights] | ||
nel_micro_p = 0.0 | ||
nel_micro_r = 0.0 | ||
nel_micro_f = 1.0 | ||
ents_f = 0.0 | ||
ents_p = 0.0 | ||
ents_r = 0.0 | ||
sents_f = null | ||
sents_p = null | ||
sents_r = null | ||
|
||
[pretraining] | ||
|
||
[optimizer] | ||
@optimizers = "Adam.v1" | ||
learn_rate = 0.001 | ||
beta1 = 0.9 | ||
beta2 = 0.999 | ||
L2 = 0.0 | ||
eps = 0.00000001 | ||
grad_clip = 1.0 | ||
L2_is_weight_decay = true | ||
use_averages = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
[paths] | ||
train = "" | ||
dev = "" | ||
raw = null | ||
init_tok2vec = null | ||
kb = "" | ||
base_nlp = "" | ||
vectors = "${paths.base_nlp}" | ||
|
||
[system] | ||
seed = 342 | ||
gpu_allocator = null | ||
|
||
[nlp] | ||
lang = "en" | ||
pipeline = ["sentencizer","entity_linker"] | ||
disabled = [] | ||
before_creation = null | ||
after_creation = null | ||
after_pipeline_creation = null | ||
tokenizer = {"@tokenizers":"spacy.Tokenizer.v1"} | ||
|
||
[components] | ||
|
||
[components.sentencizer] | ||
factory = "sentencizer" | ||
punct_chars = null | ||
|
||
[components.entity_linker] | ||
factory = "entity_linker" | ||
entity_vector_length = 64 | ||
get_candidates = {"@misc":"spacy.CandidateGenerator.v1"} | ||
incl_context = true | ||
incl_prior = true | ||
labels_discard = [] | ||
use_gold_ents = true | ||
|
||
[components.entity_linker.model] | ||
@architectures = "spacy.EntityLinker.v2" | ||
nO = null | ||
|
||
[components.entity_linker.model.tok2vec] | ||
@architectures = "spacy.HashEmbedCNN.v1" | ||
pretrained_vectors = null | ||
width = 96 | ||
depth = 2 | ||
embed_size = 2000 | ||
window_size = 1 | ||
maxout_pieces = 3 | ||
subword_features = true | ||
|
||
[initialize] | ||
vectors = ${paths.vectors} | ||
init_tok2vec = ${paths.init_tok2vec} | ||
vocab_data = null | ||
lookups = null | ||
|
||
[initialize.components] | ||
|
||
[initialize.components.entity_linker] | ||
|
||
[initialize.components.entity_linker.kb_loader] | ||
@misc = "spacy.KBFromFile.v1" | ||
kb_path = ${paths.kb} | ||
|
||
[initialize.tokenizer] | ||
|
||
|
||
[corpora] | ||
|
||
[corpora.train] | ||
@readers = "MyCorpus.v1" | ||
file = ${paths.train} | ||
|
||
[corpora.dev] | ||
@readers = "MyCorpus.v1" | ||
file = ${paths.dev} | ||
|
||
[training] | ||
train_corpus = "corpora.train" | ||
dev_corpus = "corpora.dev" | ||
seed = ${system.seed} | ||
gpu_allocator = ${system.gpu_allocator} | ||
dropout = 0.2 | ||
patience = 10000 | ||
eval_frequency = 200 | ||
accumulate_gradient = 2 | ||
max_epochs = 0 | ||
max_steps = 600 | ||
frozen_components = [] | ||
before_to_disk = null | ||
|
||
[training.logger] | ||
@loggers = "spacy.ConsoleLogger.v1" | ||
progress_bar = false | ||
|
||
|
||
[training.batcher] | ||
@batchers = "spacy.batch_by_words.v1" | ||
discard_oversize = false | ||
tolerance = 0.2 | ||
get_length = null | ||
|
||
[training.batcher.size] | ||
@schedules = "compounding.v1" | ||
start = 100 | ||
stop = 1000 | ||
compound = 1.001 | ||
t = 0.0 | ||
|
||
[training.optimizer] | ||
@optimizers = "Adam.v1" | ||
beta1 = 0.9 | ||
beta2 = 0.999 | ||
L2_is_weight_decay = true | ||
L2 = 0.01 | ||
grad_clip = 1.0 | ||
use_averages = false | ||
eps = 0.00000001 | ||
learn_rate = 0.001 | ||
|
||
[training.score_weights] | ||
nel_micro_p = 0.0 | ||
nel_micro_r = 0.0 | ||
nel_micro_f = 1.0 | ||
sents_f = null | ||
sents_p = null | ||
sents_r = null | ||
|
||
[pretraining] | ||
|
||
[optimizer] | ||
@optimizers = "Adam.v1" | ||
learn_rate = 0.001 | ||
beta1 = 0.9 | ||
beta2 = 0.999 | ||
L2 = 0.0 | ||
eps = 0.00000001 | ||
grad_clip = 1.0 | ||
L2_is_weight_decay = true | ||
use_averages = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters