定制sklearn Transformer以增加X和X的行数Y(用于文本增强)

发布于 2025-01-12 13:18:46 字数 190 浏览 5 评论 0原文

是否可以创建一个自定义的 sklearn Transformer 来增加 X 和 X 的行数?是的。基本上我想做的是基于 NLP 数据增强方法(如翻译)来增强文本(X,这是一个一维字符串列表),新文本将采用与原始文本相同的标签。然后可以将 Transformer 添加到下游分类器的管道中,例如将 BERT 包装为 sklearn 分类器。

谢谢, 英

Is it possible to create a customized sklearn Transformer that increase the # of rows of X & Ys. Basically what I would like to do is to augment the text (X, which is a 1D list of strings) based on NLP data augmentation method like translations, the new text will take the same label as the original one. The Transformer can then be added to a pipeline for downstream classifier say, BERT wrapped as sklearn classifier.

Thanks,
Ying

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文