def __init__(
        self,
        src,
        trg,
        src_vocab_size,
        trg_vocab_size,
        tasknames,
        save_dir,
        buffer_size=1e6,
        lowercase=False,
        seed=0,
    ):
        """Initialize params.

        Args:
            src(list): source dataset.
            trg(list): target dataset.
            src_vocab_size(int): The size of source vocab.
            trg_vocab_size(int): The size of target vocab.
            tasknames(list): The list of task names.
            save_dir(str): The saving dir.
            buffer_size(float): Buffer size.
            lowercase(bool): if lowercase the data.
        """
        self.seed = seed
        self.fname_src = src
        self.fname_trg = trg
        self.src_vocab_size = src_vocab_size
        self.trg_vocab_size = trg_vocab_size
        self.tasknames = tasknames
        self.save_dir = save_dir
        self.buffer_size = buffer_size
        self.lowercase = lowercase

        # Open a list of file pointers to all the files.
        self.f_src = [
            open(fname, "r", encoding="utf-8") for fname in self.fname_src
        ]
        self.f_trg = [
            open(fname, "r", encoding="utf-8") for fname in self.fname_trg
        ]

        # Initialize dictionaries that contain sentences & word mapping dicts
        self.src = [
            {"data": [], "word2id": None, "id2word": None}
            for i in range(len(self.fname_src))
        ]
        self.trg = [
            {"data": [], "word2id": None, "id2word": None}
            for i in range(len(self.fname_trg))
        ]
        self.build_vocab()

        """Reset file pointers to the start after reading the file to
        build vocabularies."""
        for idx in range(len(self.src)):
            self._reset_filepointer(idx)
        for idx in range(len(self.src)):
            self.fetch_buffer(idx)
Initialize params.

        Args:
            src(list): source dataset.
            trg(list): target dataset.
            src_vocab_size(int): The size of source vocab.
            trg_vocab_size(int): The size of target vocab.
            tasknames(list): The list of task names.
            save_dir(str): The saving dir.
            buffer_size(float): Buffer size.
            lowercase(bool): if lowercase the data.
        
utils_nlp/models/gensen/utils.py