BERT-BiLSTM-CRF-NER icon indicating copy to clipboard operation
BERT-BiLSTM-CRF-NER copied to clipboard

句子对问题,效果类似随机(已在run_classifier.py下运行,效果可接受)

Open robblecrunch opened this issue 4 years ago • 2 comments

我使用bert_base布署了二个服务,一是意图识别,效果非常好。

二是句子对相似性。识别效果不好,好像随机。我的代码如下:

coding=utf-8

import csv from bert_base.client import BertClient

for row in open('./test.tsv'): tag = row.split('\t')[0].strip() str1=row.split('\t')[1].strip() str2=row.split('\t')[2].strip()

with BertClient(show_server_config=False, check_version=False, check_length=False,
    mode="CLASS", port=7006, port_out=7007) as bc:
    res = bc.encode(['%s ||| %s' % (str1, str2)], is_tokenized = False)

print(res)

robblecrunch avatar Oct 26 '20 14:10 robblecrunch

bert_base版本是:0.09

robblecrunch avatar Oct 26 '20 21:10 robblecrunch

你好,用的模型是bert+bilstm吗?

cxx-cindy avatar Mar 26 '22 08:03 cxx-cindy