未验证 提交 d2da7f50 编写于 作者: Z Zhao Yuting 提交者: GitHub

Update text_engine.py

precommihted already
上级 82f731c1
......@@ -107,10 +107,11 @@ class PaddleTextConnectionHandler:
assert len(tokens) == len(labels)
text = ''
print(self._punc_list)
for t, l in zip(tokens, labels):
text += t
if l != 0: # Non punc.
text += self._punc_list[l]
text += self._punc_list[l - 1]
return text
else:
......@@ -160,7 +161,7 @@ class TextEngine(BaseEngine):
return False
self.executor = TextServerExecutor()
self.executor._init_from_path(
self.executor._init_from_path_new(
task=config.task,
model_type=config.model_type,
lang=config.lang,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册