Skip to content

Commit

Permalink
bug_fix (#3806)
Browse files Browse the repository at this point in the history
  • Loading branch information
lugimzzz authored Nov 18, 2022
1 parent 707a94d commit e002b0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions applications/text_classification/doccano.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,15 @@ def _check_sum(splits):
level_labels = label.split(args.separator)
for i in range(len(level_labels)):
l = args.separator.join(level_labels[:i + 1])
label_dict.append(l)
if l not in label_dict:
label_dict.append(l)
if l not in label_list:
label_list.append(l)
if args.dirty:
text = ' '.join(text.strip().split('\t')[:-1])
else:
text = ' '.join(text.strip().split('\t'))
example = text + '\t' + ','.join(label_list) + '\n'
example = text + '\t' + ','.join(label_dict) + '\n'
examples.append(example)

if not args.dirty and not args.valid:
Expand Down

0 comments on commit e002b0d

Please sign in to comment.