mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
* Recomment in training in train.py
This commit is contained in:
parent
5eb64eeb11
commit
ef67ef7a4c
|
@ -150,13 +150,11 @@ def write_parses(Language, dev_loc, model_dir, out_loc):
|
||||||
)
|
)
|
||||||
def main(train_loc, dev_loc, model_dir, n_sents=0, n_iter=15, out_loc="", verbose=False,
|
def main(train_loc, dev_loc, model_dir, n_sents=0, n_iter=15, out_loc="", verbose=False,
|
||||||
debug=False, corruption_level=0.0):
|
debug=False, corruption_level=0.0):
|
||||||
#print 'reading gold'
|
gold_train = list(read_json_file(train_loc))
|
||||||
#gold_train = list(read_json_file(train_loc))
|
train(English, gold_train, model_dir,
|
||||||
#print 'done'
|
feat_set='basic' if not debug else 'debug',
|
||||||
#train(English, gold_train, model_dir,
|
gold_preproc=False, n_sents=n_sents,
|
||||||
# feat_set='basic' if not debug else 'debug',
|
corruption_level=corruption_level, n_iter=n_iter)
|
||||||
# gold_preproc=False, n_sents=n_sents,
|
|
||||||
# corruption_level=corruption_level, n_iter=n_iter)
|
|
||||||
if out_loc:
|
if out_loc:
|
||||||
write_parses(English, dev_loc, model_dir, out_loc)
|
write_parses(English, dev_loc, model_dir, out_loc)
|
||||||
scorer = evaluate(English, list(read_json_file(dev_loc)),
|
scorer = evaluate(English, list(read_json_file(dev_loc)),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user