Added a function to the Tokenizer to return a string of the tokens.
This commit is contained in:
@@ -168,8 +168,13 @@ for r in res:
|
||||
#if result <= tol and result >= int(exp.wrong_response - exp.wrong_response * tolerance):
|
||||
|
||||
|
||||
for k in answers:
|
||||
print("Result: %s for expression: " %(format(k, ".8f")))
|
||||
tokenizer.print_token_list(answers[k])
|
||||
#for k in answers:
|
||||
# print("Result: %s for expression: " %(format(k, ".8f")))
|
||||
# tokenizer.print_token_list(answers[k])
|
||||
|
||||
with open("results.txt", "w") as f:
|
||||
for k in answers:
|
||||
f.write("Result: %s for expression: " %(format(k, ".6f")))
|
||||
f.write(tokenizer.stringify_token_list(answers[k]))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user