Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
unknown
Language Creators:
machine-generated
Annotations Creators:
expert-generated
Source Datasets:
original
ArXiv:
License:
ruanchaves commited on
Commit
ea5e507
1 Parent(s): df3effc

Update stan_small.py

Browse files
Files changed (1) hide show
  1. stan_small.py +2 -15
stan_small.py CHANGED
@@ -18,7 +18,7 @@ _DESCRIPTION = """
18
  Manually Annotated Stanford Sentiment Analysis Dataset by Bansal et al..
19
  """
20
  _URLS = {
21
- "test": "https://github.com/prashantkodali/HashSet/raw/master/datasets/stan-small-bansal_et_al.pkl"
22
  }
23
 
24
  class StanSmall(datasets.GeneratorBasedBuilder):
@@ -77,20 +77,7 @@ class StanSmall(datasets.GeneratorBasedBuilder):
77
  alts = [{"segmentation": x} for x in alts]
78
  return alts
79
 
80
- with open(filepath, 'rb') as f:
81
- try:
82
- import pickle
83
- records = pickle.load(f)
84
- except ValueError:
85
- try:
86
- import pickle5 as pickle
87
- records = pickle.load(f)
88
- except ModuleNotFoundError:
89
- raise ImportError(
90
- """To be able to use stan_small, you need to install the following dependencies['pickle5']
91
- using 'pip install pickle5' for instance"""
92
- )
93
- records = records.to_dict("records")
94
  for idx, row in enumerate(records):
95
  segmentation = get_segmentation(row)
96
  alternatives = get_alternatives(row, segmentation)
18
  Manually Annotated Stanford Sentiment Analysis Dataset by Bansal et al..
19
  """
20
  _URLS = {
21
+ "test": "https://raw.githubusercontent.com/ruanchaves/hashformers/master/datasets/stan_small.csv"
22
  }
23
 
24
  class StanSmall(datasets.GeneratorBasedBuilder):
77
  alts = [{"segmentation": x} for x in alts]
78
  return alts
79
 
80
+ records = pd.read_csv(filepath).to_dict("records")
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  for idx, row in enumerate(records):
82
  segmentation = get_segmentation(row)
83
  alternatives = get_alternatives(row, segmentation)