matchzoo.datasets.snli.load_data¶
SNLI data loader.
Module Contents¶
-
matchzoo.datasets.snli.load_data._url= https://nlp.stanford.edu/projects/snli/snli_1.0.zip¶
-
matchzoo.datasets.snli.load_data.load_data(stage: str = 'train', task: typing.Union[str, BaseTask] = 'classification', target_label: str = 'entailment', return_classes: bool = False) → typing.Union[matchzoo.DataPack, tuple]¶ Load SNLI data.
Parameters: - stage – One of train, dev, and test. (default: train)
- task – Could be one of ranking, classification or a
matchzoo.engine.BaseTaskinstance. (default: classification) - target_label – If ranking, chose one of entailment, contradiction and neutral as the positive label. (default: entailment)
- return_classes – True to return classes for classification task, False otherwise.
Returns: A DataPack unless task is classificiation and return_classes is True: a tuple of (DataPack, classes) in that case.
-
matchzoo.datasets.snli.load_data._download_data()¶
-
matchzoo.datasets.snli.load_data._read_data(path, task, target_label)¶