Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/datasets/test_iwslt2016.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ def _generate_uncleaned_train():
"<title",
"<speaker",
"<doc",
"</doc",
]
for i in range(100):
rand_string = " ".join(random.choice(string.ascii_letters) for i in range(10))
# With a 10% change, add one of the XML tags which is cleaned
# to ensure cleaning happens appropriately
if random.random() < 0.1:
open_tag = random.choice(xml_tags) + ">"
close_tag = "</" + open_tag[1:] + ">"
# Open tag already contains the closing >
close_tag = "</" + open_tag[1:]
file_contents.append(open_tag + rand_string + close_tag)
else:
examples.append(rand_string + "\n")
Expand Down
4 changes: 2 additions & 2 deletions test/datasets/test_iwslt2017.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def _generate_uncleaned_train():
"<title",
"<speaker",
"<doc",
"</doc",
]
for i in range(100):
rand_string = " ".join(random.choice(string.ascii_letters) for i in range(10))
# With a 10% change, add one of the XML tags which is cleaned
# to ensure cleaning happens appropriately
if random.random() < 0.1:
open_tag = random.choice(xml_tags) + ">"
close_tag = "</" + open_tag[1:] + ">"
# Open tag already contains the closing >
close_tag = "</" + open_tag[1:]
file_contents.append(open_tag + rand_string + close_tag)
else:
examples.append(rand_string + "\n")
Expand Down