bert icon indicating copy to clipboard operation
bert copied to clipboard

Why Chinese vocab contains ##word?

Open quincyliang opened this issue 8 years ago • 3 comments

In the chinese vocab, we see many word pieces contains ##. In my understanding, those ## words only exist if the words are rare. But after tokenization, the article is converted to a sequence of single character, in what case do we use/need those vocabs ##?

quincyliang avatar Nov 06 '18 07:11 quincyliang

I am a Chinese,but i have never seen such a character in a sentence.

tzh979215144 avatar Nov 06 '18 07:11 tzh979215144

This is the character used to denote WordPieces, it's just an artifact of the WordPiece vocabulary generator that we use, but most of those words were never actually used during training (for Chinese). So you can just ignore those tokens. Note that for the English characters that appear in Chinese text they are actually used.

jacobdevlin-google avatar Nov 06 '18 19:11 jacobdevlin-google

However, embeddings of the characters (##char) seem meaningful as I test them in a Chinese sequence classification task. I want to ask how you get the embeddings of these (##char) characters. Are they just randomly initialized? Thank you!

sz128 avatar Nov 16 '18 03:11 sz128