Skip to content

Commit

Permalink
*** update runner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gbenson committed Jun 4, 2024
1 parent 4d178cc commit 92ac899
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from itertools import chain

from dom_tokenizers.internal import json
from dom_tokenizers.pre_tokenizers.shared_oracle import SharedOracle

DEFAULT_TESTCASES = [
Expand Down Expand Up @@ -38,9 +37,14 @@ def main():
lines = DEFAULT_TESTCASES
else:
lines = chain.from_iterable(
(json.loads(line)["text"]
for line in open(filename).readlines())
for filename in sys.argv[1:])
(line.rstrip()
for code, line in (
line.split(maxsplit=1)
for line in open(filename).readlines()
)
if code == "data")
for filename in sys.argv[1:]
)

for line in lines:
print("input:", line)
Expand Down

0 comments on commit 92ac899

Please sign in to comment.