arxyzan commited on
Commit
18e6c1d
1 Parent(s): cca0e04

Update arman_ner.py

Browse files
Files changed (1) hide show
  1. arman_ner.py +3 -0
arman_ner.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import csv
2
 
3
  import datasets
@@ -100,4 +101,6 @@ class ArmanNER(datasets.GeneratorBasedBuilder):
100
 
101
  for id_, row in enumerate(csv_reader):
102
  tokens, ner_tags = row
 
 
103
  yield id_, {"tokens": tokens, "ner_tags": ner_tags}
 
1
+ from ast import literal_eval
2
  import csv
3
 
4
  import datasets
 
101
 
102
  for id_, row in enumerate(csv_reader):
103
  tokens, ner_tags = row
104
+ tokens = literal_eval(tokens)
105
+ ner_tags = literal_eval(ner_tags)
106
  yield id_, {"tokens": tokens, "ner_tags": ner_tags}