Once we trained the model with the imdb texts and saved it as a model.
Then we can load the pre-trained model again with the same vocabulary like this:
dls_clas = DataBlock( blocks=(TextBlock.from_folder(path, vocab=dls_lm.vocab),CategoryBlock), get_y = parent_label, get_items=partial(get_text_files, folders=['train', 'test']), splitter=GrandparentSplitter(valid_name='test') ).dataloaders(path, path=path, bs=128, seq_len=72)
Now, I have a totally different NLP task which is to do classification(10 categories) for comments.
I would like to add the vocabulary from my new task into the existing vocabulary, so it recognizes something like: COVID-19
How can I do it?