Browse Source

Fix CoNLLDataset

pull/1544/head
Hironsan 3 years ago
parent
commit
ef1aa11fb6
1 changed files with 6 additions and 0 deletions
  1. 6
      backend/api/views/upload/dataset.py

6
backend/api/views/upload/dataset.py

@ -242,6 +242,12 @@ class CoNLLDataset(Dataset):
record = Record(data=data, label=labels)
yield record
words, tags = [], []
if words:
text = delimiter.join(words)
data = self.data_class.parse(filename=filename, text=text)
labels = self.get_label(words, tags, delimiter)
record = Record(data=data, label=labels)
yield record
def get_scheme(self, scheme: str):
mapping = {

Loading…
Cancel
Save