pytorch/text

Adding vocab to field object

开放

#378 创建于 2018年9月8日

 (12 条评论) (1 个反应) (0 位负责人)Python (822 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (3,396 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Hi Everyone,

Is there any way of adding more vocabulary to a Field object that already has had its vocab built?

for example if at one point I have run this sort of code:

TEXT = field()
TEXT.build_vocab(dataset_a)

Is it possible to add vocab to TEXT from another dataset without erasing the current vocab built from dataset_a?

Thanks!

贡献者指南