-
Notifications
You must be signed in to change notification settings - Fork 1
/
classes.py
50 lines (42 loc) · 959 Bytes
/
classes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from dataclasses import dataclass
@dataclass
class AlignmentNumbers:
insertion_count: int
deletion_count: int
@dataclass
class TreeMatches:
tokenization_matches: int
pos_matches: int
uas_matches: int
label_matches: int
las_matches: int
word_matches: int
pp_att_matches: int
pp_ls_matches: int
pp_las_matches: int
@dataclass
class TreeCounts:
ref_token_count: int
pred_token_count: int
full_token_count: int
ref_word_count: int
@dataclass
class ConllxScores:
tokenization_f_score: float
tokenization_precision: float
tokenization_recall: float
word_accuracy: float
pos: float
uas: float
label: float
las: float
pp_att: float
pp_ls: float
pp_las: float
@dataclass
class ConllxStatistics:
tree_counts: TreeCounts
tree_matches: TreeMatches
# conllx_scores: ConllxScores
alignment_numbers: AlignmentNumbers
sentence_number: int