(self, filepath: str, transform_fn: Callable[[str], List[int]],
                 min_length: int, pad_val: int = 1)
Instantiating Corpus class

        Args:
            filepath (str): filepath
            transform_fn (Callable): a function that can act as a transformer
            min_length (int): minimum length of sequence
                             (if length is lower than min_length, the sequence is padded to min_length)
            pad_val (int): the index of padding
Instantiating Corpus class
Instantiating Corpus class
def __init__(self, filepath: str, transform_fn: Callable[[str], List[int]],
                 min_length: int, pad_val: int = 1) -> None:
        """Instantiating Corpus class

        Args:
            filepath (str): filepath
            transform_fn (Callable): a function that can act as a transformer
            min_length (int): minimum length of sequence
                             (if length is lower than min_length, the sequence is padded to min_length)
            pad_val (int): the index of padding
        """
        self._corpus = pd.read_csv(filepath, sep='\t').loc[:, ['document', 'label']]
        self._transform = transform_fn
        self._min_length = min_length
        self._pad_val = pad_val
def __init__ ( self , filepath : str , transform_fn : Callable [ [ str ] , List [ int ] ] , min_length : int , pad_val : int = 1 ) -> None : self . _corpus = pd . read_csv ( filepath , sep = '\t' ) . loc [ : , [ 'document' , 'label' ] ] self . _transform = transform_fn self . _min_length = min_length self . _pad_val = pad_val