(b) Append it to the end of the vocab, and write a script which generates a new checkpoint that is identical to the pre-trained checkpoint, but but with a bigger vocab where the new embeddings are randomly initialized (for initialized we used tf.truncated_normal_initializer(stddev=0.02)). This will likely require mucking around with some tf.concat() and tf.assign() calls.
我有一些专业词汇想添加进词典。 google_zh_vocab.txt 里面有100个空位,但是这个数量远远达不到需求。不知道我如果想添加成千上万的专业词汇该怎么办?
在这个回答中看到,在词典中加新词是可以的 https://github.com/google-research/bert/issues/9
但是具体怎么做我也不太懂。
所以,不知道UER-py能否考虑加入附加词典的功能呢?