"ml/backend/vscode:/vscode.git/clone" did not exist on "1108d8b34e43e968812eded0ccda73503ccad77d"
Unverified Commit b1019d2a authored by Yiqing-Zhou's avatar Yiqing-Zhou Committed by GitHub
Browse files

token[-1] -> token.rstrip('\n')

parent bef0c629
......@@ -69,7 +69,7 @@ def load_vocab(vocab_file):
with open(vocab_file, "r", encoding="utf-8") as reader:
tokens = reader.readlines()
for index, token in enumerate(tokens):
token = token[:-1]
token = token.rstrip('\n')
vocab[token] = index
return vocab
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment