File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## [ Unreleased]
4
+
5
+ ### Fixed
6
+
7
+ - Apply biaffine dependency encoding before sequence labeling, so that
8
+ the TüBa-D/Z lemma decoder has access to dependency relations.
9
+
3
10
## 0.3.0
4
11
5
12
### Added
Original file line number Diff line number Diff line change @@ -62,15 +62,18 @@ impl Tagger {
62
62
predictions. biaffine_score_logits. is_some( ) ,
63
63
) ;
64
64
65
- self . decode_sequence_labels ( sentences, predictions. sequences_top_k ) ?;
66
-
65
+ // Decode dependencies before sequence labels. Biaffine parsing does not require any
66
+ // other annotations. Sequence labelers, however, may require dependencies (e.g. the
67
+ // TüBa-D/Z lemmatizer).
67
68
if let ( Some ( encoder) , Some ( biaffine_score_logits) ) = (
68
69
self . biaffine_encoder . as_ref ( ) ,
69
70
predictions. biaffine_score_logits ,
70
71
) {
71
72
tch:: no_grad ( || self . decode_biaffine ( encoder, sentences, biaffine_score_logits) ) ?
72
73
}
73
74
75
+ self . decode_sequence_labels ( sentences, predictions. sequences_top_k ) ?;
76
+
74
77
Ok ( ( ) )
75
78
}
76
79
You can’t perform that action at this time.
0 commit comments