Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Feb 25, 2025
1 parent 2bb0855 commit f78e7a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stanza/models/constituency/parser_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ def train_model_one_batch(epoch, batch_idx, model, training_batch, transition_te

similarity_loss = 0.0
# TODO: expand this to other transition schemes
if args['similarity_learning_rate'] > 0.0 and epoch <= args['similiarity_end_epoch'] and args['transition_scheme'] is TransitionScheme.IN_ORDER:
if args['similarity_learning_rate'] > 0.0 and epoch <= args['similarity_end_epoch'] and args['transition_scheme'] is TransitionScheme.IN_ORDER:
reparsed_results = model.parse_sentences(iter([x.tree for x in training_batch]), model.build_batch_from_trees, len(training_batch), model.predict, keep_output_layers=True)
gold_results = model.analyze_trees([x.tree for x in training_batch], keep_output_layers=True)
errors = [error_analysis_in_order.analyze_tree(result.gold, result.predictions[0].tree) for result in reparsed_results]
Expand Down

0 comments on commit f78e7a4

Please sign in to comment.