bert as service

1.git 地址 https://github.com/hanxiao/bert-as-service

2.pip安装

pip install bert-serving-server # 服务端

pip install bert-serving-client # 客户端

3.启动

bert-serving-start 

4.使用

from bert_serving.client import BertClient
bc = BertClient()
doc_vecs = bc.encode(['First do it', 'then do it right', 'then do it better'])

posted on 2020-11-23 10:12  nnnnnnnnnnnnnnnn  阅读(172)  评论(0)    收藏  举报

导航