def _predict_next_word_max(self, sentence_list: list):
    test_item = torch.tensor([[self._word_vocab.stoi[x]] for x in sentence_list], device=DEVICE)
    (pred_prob, pred_index) = torch.max(torch.softmax(self._model(test_item)[(- 1)], dim=0).cpu().data, dim=0)
    pred_word = TEXT.vocab.itos[pred_index]
    pred_prob = pred_prob.item()
    return (pred_word, pred_prob)
def _predict_next_word_max(self, sentence_list: list):
    test_item = torch.tensor([[self._word_vocab.stoi[x]] for x in sentence_list], device=DEVICE)
    (pred_prob, pred_index) = torch.max(torch.softmax(self._model(test_item)[(- 1)], dim=0).cpu().data, dim=0)
    pred_word = TEXT.vocab.itos[pred_index]
    pred_prob = pred_prob.item()
    return (pred_word, pred_prob)