-
Notifications
You must be signed in to change notification settings - Fork 3
/
base_config.cfg
111 lines (85 loc) · 2.32 KB
/
base_config.cfg
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[paths]
train = "srp_training_data/srp_set-ud-train.spacy"
dev = "srp_training_data/srp_set-ud-dev.spacy"
[system]
gpu_allocator = null
[nlp]
lang = "srp"
pipeline = ["tok2vec","tagger","parser", "attribute_ruler", "lemmatizer"]
tokenizer = {"@tokenizers": "spacy.Tokenizer.v1"}
batch_size = 1000
[components]
[components.tok2vec]
factory = "tok2vec"
[components.tok2vec.model]
@architectures = "spacy.Tok2Vec.v2"
[components.tok2vec.model.embed]
@architectures = "spacy.MultiHashEmbed.v1"
width = ${components.tok2vec.model.encode.width}
attrs = ["ORTH", "SHAPE"]
rows = [5000, 2500]
include_static_vectors = false
[components.tok2vec.model.encode]
@architectures = "spacy.MaxoutWindowEncoder.v2"
width = 96
depth = 4
window_size = 1
maxout_pieces = 3
[components.attribute_ruler]
factory = "attribute_ruler"
[components.lemmatizer]
factory = "srp_lemmatizer"
# There are no recommended transformer weights available for language 'sr'
# yet, so the pipeline described here is not transformer-based.
[components.tagger]
factory = "tagger"
[components.tagger.model]
@architectures = "spacy.Tagger.v1"
nO = null
[components.parser]
factory = "parser"
[components.parser.model]
@architectures = "spacy.TransitionBasedParser.v1"
tok2vec=${components.tok2vec.model}
state_type = "parser"
extra_state_tokens = false
hidden_width = 128
maxout_pieces = 3
use_upper = true
nO = null
[corpora]
[corpora.train]
@readers = "spacy.Corpus.v1"
path = "${paths.train}"
# Maximum document length. Longer documents will be split into sentences, if sentence boundaries are available. Defaults to 0 for no limit.
#max_length = 500
max_length = 0
#Limit corpus to a subset of examples, e.g. for debugging. Defaults to 0 for no limit.
limit = 0
[corpora.dev]
@readers = "spacy.Corpus.v1"
path = ${paths.dev}
max_length = 0
[training]
dev_corpus = "corpora.dev"
train_corpus = "corpora.train"
#max_steps = 20000
# lowered for testing
max_steps = 600
[training.optimizer]
@optimizers = "Adam.v1"
[training.batcher]
@batchers = "spacy.batch_by_words.v1"
discard_oversize = false
tolerance = 0.2
[training.batcher.size]
@schedules = "compounding.v1"
start = 100
stop = 1000
compound = 1.001
[initialize]
[initialize.components]
[initialize.components.attribute_ruler]
[initialize.components.attribute_ruler.tag_map]
@readers = "srsly.read_json.v1"
path = "srp/tag_map.json"