diff options
author | John Bauer <horatio@gmail.com> | 2022-09-13 05:16:17 +0300 |
---|---|---|
committer | John Bauer <horatio@gmail.com> | 2022-09-13 05:16:17 +0300 |
commit | b8ba4a7ada33cd1d9ee2c0af98458554c75ded48 (patch) | |
tree | 6b1cf6bbffd58e413bb1fb6bca98987a283133fc | |
parent | 3ad35528cbbd2ee5b5f0f3441b68599aaf760496 (diff) |
Default trees written with format _O
-rw-r--r-- | stanza/models/constituency/trainer.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stanza/models/constituency/trainer.py b/stanza/models/constituency/trainer.py index 9a6ea4c1..8e270959 100644 --- a/stanza/models/constituency/trainer.py +++ b/stanza/models/constituency/trainer.py @@ -942,19 +942,19 @@ def run_dev_set(model, dev_trees, args, evaluator=None): else: with open(pred_file, 'w') as fout: for tree in treebank: - fout.write("{:_}".format(tree.predictions[0].tree)) + fout.write("{:_O}".format(tree.predictions[0].tree)) fout.write("\n") for i in range(args['num_generate']): pred_file = os.path.join(args['predict_dir'], args['predict_file'] + ".%03d.pred.mrg" % i) with open(pred_file, 'w') as fout: for tree in generated_treebanks[i+1]: - fout.write("{:_}".format(tree.predictions[0].tree)) + fout.write("{:_O}".format(tree.predictions[0].tree)) fout.write("\n") with open(orig_file, 'w') as fout: for tree in treebank: - fout.write("{:_}".format(tree.gold)) + fout.write("{:_O}".format(tree.gold)) fout.write("\n") if len(full_results) == 0: |