d877727abf662d0545d4e69e5477e3fe33141a04,finetune/util/metrics.py,,sequence_labeling_token_confusion,#Any#Any#Any#,39
Before Change
def sequence_labeling_token_confusion(text, true, predicted):
nlp = get_spacy()
none_class = "<None>"
unique_classes = list(set([seq["label"] for seqs in true + predicted for seq in seqs]))
unique_classes.append(none_class)
true_per_token_all = []
After Change
def sequence_labeling_token_confusion(text, true, predicted):
nlp = get_spacy()
none_class = "<None>"
unique_classes = _get_unique_classes(true, predicted)
unique_classes.append(none_class)
true_per_token_all = []
pred_per_token_all = []
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: IndicoDataSolutions/finetune
Commit Name: d877727abf662d0545d4e69e5477e3fe33141a04
Time: 2020-06-24
Author: benlt@hotmail.co.uk
File Name: finetune/util/metrics.py
Class Name:
Method Name: sequence_labeling_token_confusion
Project Name: IndicoDataSolutions/finetune
Commit Name: d877727abf662d0545d4e69e5477e3fe33141a04
Time: 2020-06-24
Author: benlt@hotmail.co.uk
File Name: finetune/util/metrics.py
Class Name:
Method Name: sequence_labeling_counts
Project Name: IndicoDataSolutions/finetune
Commit Name: d877727abf662d0545d4e69e5477e3fe33141a04
Time: 2020-06-24
Author: benlt@hotmail.co.uk
File Name: finetune/util/metrics.py
Class Name:
Method Name: sequence_labeling_token_counts