(self, sents: List[List[str]], device: torch.device)
return torch.t(sents_var)
Convert list of sentences (words) into tensor with necessary padding for 
        shorter sentences.

        @param sents (List[List[str]]): list of sentences (words)
        @param device: device on which to load the tesnor, i.e. CPU or GPU

        @returns sents_var: tensor of (max_sentence_length, batch_size)
Convert list of sentences (words) into tensor with necessary padding for 
        shorter sentences.
Convert list of sentences ( words ) into tensor with necessary padding for shorter sentences .
def to_input_tensor(self, sents: List[List[str]], device: torch.device) -> torch.Tensor:
        """ Convert list of sentences (words) into tensor with necessary padding for 
        shorter sentences.

        @param sents (List[List[str]]): list of sentences (words)
        @param device: device on which to load the tesnor, i.e. CPU or GPU

        @returns sents_var: tensor of (max_sentence_length, batch_size)
        """
        word_ids = self.words2indices(sents)
        # print("0"*80)
        sents_t = pad_sents(word_ids, self['<pad>'])
        # print(sents_t)
        sents_var = torch.tensor(sents_t, dtype=torch.long, device=device)
        return torch.t(sents_var)
def to_input_tensor ( self , sents : List [ List [ str ] ] , device : torch . device ) -> torch . Tensor : word_ids = self . words2indices ( sents ) # print("0"*80) sents_t = pad_sents ( word_ids , self [ '<pad>' ] ) # print(sents_t) sents_var = torch . tensor ( sents_t , dtype = torch . long , device = device ) return torch . t ( sents_var )