ruanchaves
commited on
Commit
·
dcf9e61
1
Parent(s):
c2ac41e
Update stan_large.py
Browse files- stan_large.py +2 -0
stan_large.py
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
from multiprocessing.sharedctypes import Value
|
4 |
import datasets
|
5 |
import pandas as pd
|
|
|
6 |
|
7 |
_CITATION = """
|
8 |
@inproceedings{maddela-etal-2019-multi,
|
@@ -101,6 +102,7 @@ class StanLarge(datasets.GeneratorBasedBuilder):
|
|
101 |
return alts
|
102 |
|
103 |
records = pd.read_csv(filepath).to_dict("records")
|
|
|
104 |
for idx, row in enumerate(records):
|
105 |
segmentation = get_segmentation(row)
|
106 |
alternatives = get_alternatives(row, segmentation)
|
|
|
3 |
from multiprocessing.sharedctypes import Value
|
4 |
import datasets
|
5 |
import pandas as pd
|
6 |
+
import ast
|
7 |
|
8 |
_CITATION = """
|
9 |
@inproceedings{maddela-etal-2019-multi,
|
|
|
102 |
return alts
|
103 |
|
104 |
records = pd.read_csv(filepath).to_dict("records")
|
105 |
+
records = [{"hashtags": row["hashtags"], "goldtruths": ast.literal_eval(row["goldtruths"])} for row in records]
|
106 |
for idx, row in enumerate(records):
|
107 |
segmentation = get_segmentation(row)
|
108 |
alternatives = get_alternatives(row, segmentation)
|