fe498b3d5e1e29fb756c203d50e217e8f258e561,examples/training/train_parser.py,,main,#Any#Any#Any#,41
Before Change
random.shuffle(TRAIN_DATA)
losses = {}
for words, heads, deps in TRAIN_DATA:
doc = Doc(nlp.vocab, words=words)
gold = GoldParse(doc, heads=heads, deps=deps)
nlp.update([doc], [gold], sgd=optimizer, losses=losses)
print(losses)
// test the trained model
After Change
// add labels to the parser
for _, annotations in TRAIN_DATA:
for dep in annotations.get("deps", []) :
parser.add_label(dep)
// get names of other pipes to disable them during training
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: explosion/spaCy
Commit Name: fe498b3d5e1e29fb756c203d50e217e8f258e561
Time: 2017-11-06
Author: ines@ines.io
File Name: examples/training/train_parser.py
Class Name:
Method Name: main
Project Name: explosion/spaCy
Commit Name: fe498b3d5e1e29fb756c203d50e217e8f258e561
Time: 2017-11-06
Author: ines@ines.io
File Name: examples/training/train_intent_parser.py
Class Name:
Method Name: main
Project Name: mathics/Mathics
Commit Name: 6481223f72b97d7a03aa5ee373836dac97a352e7
Time: 2021-02-14
Author: matera@fisica.unlp.edu.ar
File Name: mathics/builtin/assignment.py
Class Name:
Method Name: _get_usage_string
Project Name: explosion/spaCy
Commit Name: fe498b3d5e1e29fb756c203d50e217e8f258e561
Time: 2017-11-06
Author: ines@ines.io
File Name: examples/training/train_parser.py
Class Name:
Method Name: main