Skip to content

Commit

Permalink
fix r8 dataset reader for better reproducibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ikuyamada committed Sep 20, 2019
1 parent 26d33ce commit 5b6035d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/text_classification/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def load_r8_dataset(dataset_path, dev_size=0.05):
train_data = []
test_data = []

for file_name in os.listdir(dataset_path):
for file_name in sorted(os.listdir(dataset_path)):
if file_name.endswith('.sgm'):
with open(os.path.join(dataset_path, file_name), encoding='ISO-8859-1') as f:
for node in BeautifulSoup(f.read(), 'html.parser').find_all('reuters'):
Expand Down

0 comments on commit 5b6035d

Please sign in to comment.