bert_seq2seq icon indicating copy to clipboard operation
bert_seq2seq copied to clipboard

粗粒度NER-tokenizer问题

Open NiceMartin opened this issue 4 years ago • 1 comments

在NER中, 一个比较容易出错的地方是由于tokenizer以后, 导致 句子和原始输入的句子长度、token的位置不一致. 在 tokenier.py的代码中, 好像并没有解决 tokenizer输入和输出长度不一致的问题. 例如, 在读入 粗粒度NER的语料后, sents_src, sents_tgt = read_corpus(data_path)
其中的 sents_src[3], sents_tgt[3], 经过 tokenizer以后, 长度并一致, 这样会报错.

NiceMartin avatar Aug 01 '21 12:08 NiceMartin

早就在群里说过了,这里有坑,想想如何对应上,不难。

920232796 avatar Aug 01 '21 15:08 920232796