w-nicole commited on
Commit
75a2798
1 Parent(s): 9be07b2

trying dataset encoding change, doesn't work on om

Browse files
Files changed (1) hide show
  1. childes_data.py +2 -1
childes_data.py CHANGED
@@ -98,7 +98,8 @@ class Childes(datasets.GeneratorBasedBuilder):
98
 
99
  def _generate_examples(self, file_path):
100
 
101
- with open(file_path, 'r') as f:
 
102
  for idx, line in enumerate(f.readlines()):
103
  yield idx, {"text" : line}
104
 
98
 
99
  def _generate_examples(self, file_path):
100
 
101
+ # 6/17: https://stackoverflow.com/questions/10406135/unicodedecodeerror-ascii-codec-cant-decode-byte-0xd1-in-position-2-ordinal
102
+ with open(file_path, 'r', encoding="utf-8") as f:
103
  for idx, line in enumerate(f.readlines()):
104
  yield idx, {"text" : line}
105