remove restful func

Signed-off-by: zu1k <i@zu1k.com>
pull/30/head
zu1k 2022-12-02 11:35:01 +08:00
parent a3047a7f0c
commit e4b77505f3
No known key found for this signature in database
GPG Key ID: AE381A8FB1EF2CC8
1 changed files with 0 additions and 10 deletions

View File

@ -6,7 +6,6 @@ import random
import os
import numpy as np
from tqdm import tqdm
from hanlp_restful import HanLPClient
def seed_everything(seed=2022):
@ -24,17 +23,8 @@ def seed_everything(seed=2022):
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
seed_everything()
"""
Restful 方式不能一直调用
"""
# HanLP = HanLPClient('https://www.hanlp.com/api', auth=None, language='mul') # auth不填则匿名zh中文mul多语种
# s = time.time()
# print(HanLP.tokenize("2021年HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。阿婆主来到北京立方庭参观自然语义科技公司。"))
# print(f"分词耗时{time.time()-s}s")
"""
专业级本地模型