Update taiwanese_english_translation.py
Browse files
taiwanese_english_translation.py
CHANGED
@@ -150,7 +150,7 @@ class TaiwaneseEnglishTranslation(datasets.GeneratorBasedBuilder):
|
|
150 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
151 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
152 |
"""This function returns the examples in the raw (text) form."""
|
153 |
-
with open(
|
154 |
csv_reader = csv.reader(f, delimiter=',')
|
155 |
source_sentences, target_sentences = [], []
|
156 |
line_count = 1
|
|
|
150 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
151 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
152 |
"""This function returns the examples in the raw (text) form."""
|
153 |
+
with open(file_path, encoding="utf-8") as f:
|
154 |
csv_reader = csv.reader(f, delimiter=',')
|
155 |
source_sentences, target_sentences = [], []
|
156 |
line_count = 1
|