pytorch/text

Adding vocab to field object

Open

#378 建立於 2018年9月8日

在 GitHub 查看
 (12 留言) (1 反應) (0 負責人)Python (822 fork)batch import
enhancementhelp wanted

倉庫指標

Star
 (3,396 star)
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!

貢獻者指南