Use bert with sentence_piece as a web service to encode sentence.
Note: You should download a bert model with senence_piece on your computer.
bert-serving-client to get encoded sentence.
code example:
from bert_serving.client import BertClient
bc = BertClient()
bc.encode(['hello word'])Content type
Image
Digest
Size
376.8 MB
Last updated
over 7 years ago
docker pull yangperasd/bert_serving