如何用bert nlpaug中的原始令牌替换[unk]令牌
我正在尝试使用nlpaug交换一些单词,但是由于它,它遇到了问题,用[UNK]代币永久取代令牌。我在此处使用这些文档:
我的代码一个示例就是这样:
aug = naw.ContextualWordEmbsAug(action='substitute', top_k=10,
aug_min=2, aug_max=4, stopwords=stops, batch_size=25)
aug.augment('You deposit the minimum amount (which is Rs 25/-) and buy tickets (Tickets are your entry fee) and start playing the game with others.')
输出
'[UNK] deposit the entire amount ( which is rs 10 / - ) and buy tickets ( tickets are your entry cost ) and start playing the game with ease.'
我在句子中失去了您,并希望保留此句子。这发生在一个句子的宇宙中,因此一个简单的案例修复将不是这里的答案。任何帮助将不胜感激。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论