提交 84692191 编写于 作者: S Steffy-zxf 提交者: wuzewu

Modify the coding format of senta_demo.py and lac_demo.py (#50)

上级 c8704585
......@@ -19,10 +19,10 @@ if __name__ == "__main__":
results = lac.lexical_analysis(data=inputs)
for result in results:
if six.PY2:
print(json.dumps(
result['word'], encoding="utf8", ensure_ascii=False))
print(json.dumps(
result['tag'], encoding="utf8", ensure_ascii=False))
print(
json.dumps(result['word'], encoding="utf8", ensure_ascii=False))
print(
json.dumps(result['tag'], encoding="utf8", ensure_ascii=False))
else:
print(result['word'])
print(result['tag'])
......@@ -21,7 +21,7 @@ if __name__ == "__main__":
results[index]["text"] = text
for index, result in enumerate(results):
if six.PY2:
print(json.dumps(
results[index], encoding="utf8", ensure_ascii=False))
print(
json.dumps(results[index], encoding="utf8", ensure_ascii=False))
else:
print(results[index])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册