Load the Stanford Natural Language Inference (SNLI) corpus (Bowman, Angeli, Potts, & Manning, 2015). It is a collection of 570,000 human-written English sentence pairs manually labeled for balanced classification with the labels entailment, contradiction, and neutral.


  • path: str. Path to directory which either stores file or otherwise file will be downloaded and extracted there. Filename is snli_1.0/.


Tuple of dict x_train, x_test, x_valid. Each dict has keys 'sentence1', 'sentence2', 'label'. The kth value in each key, e.g., x_train['sentence1'][k], x_train['sentence2'][k], x_train['label'][k] comprises of a sentence pair and its label.

Bowman, S. R., Angeli, G., Potts, C., & Manning, C. D. (2015). A large annotated corpus for learning natural language inference. In Empirical methods on natural language processing.