bert icon indicating copy to clipboard operation
bert copied to clipboard

How are out of vocabulary words handled for Chinese?

Open liweitj47 opened this issue 8 years ago • 1 comments

I understand there may not exist OOV or UNK problem when using word piece, but how are the OOV characters handled for Chinese? Are they mapped to [UNK]? I was not able to find such operations in the tokenization.py file.

liweitj47 avatar Nov 06 '18 12:11 liweitj47

The top 8000 characters are character-tokenized, other characters are mapped to [UNK]. I should've commented this section better but it's here

Basically that's saying if it tries to apply WordPiece tokenization (the character tokenization happens previously), and it gets to a single character that it can't find, it maps it to unk_token.

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