Load数据出现resolves to a non-exist meta file 错误?

版本
hanlp.version
‘2.1.0-alpha.12’

word2vec_model = hanlp.load(hanlp.pretrained.word2vec.RADICAL_CHAR_EMBEDDING_100)

raise FileNotFoundError(f'The identifier {save_dir} resolves to a non-exist meta file {metapath}. {tips}')
FileNotFoundError: The identifier /Users/xxx/data/hanlp/embeddings/radical_char_vec_20191229_013849/character.vec.txt resolves to a non-exist meta file /Users/xxx/data/hanlp/embeddings/radical_char_vec_20191229_013849/character.vec.txt/config.json. 

去试国内镜像:https://od.hankcs.com/hanlp/datav2/
依然没有解决问题。

大部分第三方模型不符合hanlp规范,不能直接hanlp.load。你可以通过设计好的类型load:

import hanlp
from hanlp.layers.embeddings.word2vec import Word2VecEmbedding
print(Word2VecEmbedding(filepath=hanlp.pretrained.word2vec.TENCENT_AI_LAB_EMBEDDING).input_dim)