ChineseNER
ChineseNER copied to clipboard
中文命名实体识别,实体抽取,tensorflow,pytorch,BiLSTM+CRF
def get_entity(x,y,id2tag): entity="" res=[] for i in range(len(x)): #for every sen for j in range(len(x[0])): #for every word ... ... 这两个for循环中第一个是没问题的,因为统一batchsize大小了,但第二个for循环就有问题了, 因为x[0]的大小可能会大于60 这里没有做cut操作,因此j会大于60 导致y[i][j]数组越界,希望楼主可以更改一下。加上一个判断 for i in range(len(x)): #for every...
E.g. if a word (北大) is not recognized as an organisation, could we add this word to let the model know this word?
您好,想问一下,如果我们想在训练集中加入股票新闻数据,然后增加 股票名称 这个标签(除了loc,name,org这些标签以外的新标签)的话,我们应该怎么去做呢?万分谢谢!
中文版: python重现了该代码: https://gitee.com/chashaozgr/noteLibrary/tree/master/nlp_trial/ner/src/bilstm_crf 用的人民日报的数据,python3,tensorflow==1.12 准确率确如readme所示,但是从混淆矩阵看来,由于用了padding的方法进行了预测,所以实际为0类的量(即补充部分)远比其他类多,导致样本标签不均衡,所以准确性不可信,85%+的准确性大部分来源于0类分给0类,如果缩短padding长度,precision会迅速下降。 看看大家有没有什么对策。 English version: I reproduced the code here: https://gitee.com/chashaozgr/noteLibrary/tree/master/nlp_trial/ner/src/bilstm_crf Data source People’s Daily Environment: python3.6, tensorflow==1.12 The accuracy tested is the same as shown in...
File "C:\Users\14027\ChineseNER\tensorflow\train.py", line 18, in word2id = pickle.load(inp) ^^^^^^^^^^^^^^^^ _pickle.UnpicklingError: could not find MARK 这行代码报错是怎么回事呢? 而且我下载的代码的data中为什么没有renmindata.pkl和Bosondata.pkl