This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import torch | |
from torchtext.experimental.datasets.translation import DATASETS, TranslationDataset | |
from torchtext.vocab import build_vocab_from_iterator | |
from torchtext.experimental.functional import ( | |
vocab_func, | |
totensor, | |
sequential_transforms, | |
) | |
from torchtext.data.utils import get_tokenizer |