DeepKE icon indicating copy to clipboard operation
DeepKE copied to clipboard

questions about proprecess.py in standard ner

Open JY-Ren opened this issue 4 years ago • 1 comments

image

why valid append 1?

JY-Ren avatar Nov 09 '22 03:11 JY-Ren

这个是为了英文单词用的,英文的一个word可能被tokenize成几个子token,只取第一个token,因为一个word对应一个label,不可能多个token的word对应一个label,中文不存在这个问题,所以valid数组这对于中文来说没啥用处。

This is for English words. One word in English may be tokenized into several sub tokens, and only the first token is taken. Because one word corresponds to one label, it is impossible to have multiple token words corresponding to one label.This problem does not exist in Chinese, so the valid array is not useful for Chinese

tlk1997 avatar Nov 09 '22 07:11 tlk1997