Stanford Natural Language Inference¶
Various functions for accessing the SNLI dataset.
-
dynn.data.snli.
download_snli
(path='.', force=False)¶ Downloads the SNLI from “https://nlp.stanford.edu/projects/snli/”
Parameters:
-
dynn.data.snli.
load_snli
(path, terminals_only=True, binary=False)¶ Loads the SNLI dataset
Returns the train, dev and test sets in a dictionary, each as a tuple of containing the trees and the labels.
Parameters: Returns: - Dictionary containing the train, dev and test sets
(tuple of tree/labels tuples)
Return type:
-
dynn.data.snli.
read_snli
(split, path, terminals_only=True, binary=False)¶ Iterates over the SNLI dataset
Example:
for tree, label in read_snli("train", "/path/to/snli"): train(tree, label)
Parameters: Returns: tree, label
Return type: