Unverified Commit 31fad29a authored by Patrick Yi's avatar Patrick Yi Committed by GitHub
Browse files

Add get_tokenizer function for Engine class (#1653)

parent 9da5a60b
...@@ -809,4 +809,12 @@ class Engine: ...@@ -809,4 +809,12 @@ class Engine:
def shutdown(self): def shutdown(self):
kill_child_process(os.getpid(), including_parent=False) kill_child_process(os.getpid(), including_parent=False)
def get_tokenizer(self):
global tokenizer_manager
if tokenizer_manager is None:
raise ReferenceError("Tokenizer Manager is not initialized.")
else:
return tokenizer_manager.tokenizer
# TODO (ByronHsu): encode # TODO (ByronHsu): encode
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