DocEE icon indicating copy to clipboard operation
DocEE copied to clipboard

bert的使用

Open yewuchen414 opened this issue 1 year ago • 2 comments

请问代码中的bert模型可以在本地准备吗,我注意到代码里有一个self.tokenizer.dee_tokenize(sent_text),但是不太清楚dee_tokenize是什么,运行之后显示没有这个东西

yewuchen414 avatar Oct 27 '24 14:10 yewuchen414

嗨您好,目前的模型都使用了bert的中文词表来做token id转换,所以需要本地准备一个bert tokenizer的相关model和config,是可以提前在本地保存然后再导入的。

关于dee_tokenize的定义可以在这里找到:https://github.com/Spico197/DocEE/blob/a32b6f8bf0b2fe28b9942b0b53eff461abf561ba/dee/utils.py#L142-L145

Spico197 avatar Oct 27 '24 14:10 Spico197

您的邮件已收到,我会尽快回复

yewuchen414 avatar Oct 27 '24 14:10 yewuchen414