We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 707a94d commit e002b0dCopy full SHA for e002b0d
applications/text_classification/doccano.py
@@ -115,14 +115,15 @@ def _check_sum(splits):
115
level_labels = label.split(args.separator)
116
for i in range(len(level_labels)):
117
l = args.separator.join(level_labels[:i + 1])
118
- label_dict.append(l)
+ if l not in label_dict:
119
+ label_dict.append(l)
120
if l not in label_list:
121
label_list.append(l)
122
if args.dirty:
123
text = ' '.join(text.strip().split('\t')[:-1])
124
else:
125
text = ' '.join(text.strip().split('\t'))
- example = text + '\t' + ','.join(label_list) + '\n'
126
+ example = text + '\t' + ','.join(label_dict) + '\n'
127
examples.append(example)
128
129
if not args.dirty and not args.valid:
0 commit comments