torch_geometric.datasets.CWQDataset

class CWQDataset(root: str, split: str = 'train', force_reload: bool = False, verbose: bool = False, use_pcst: bool = True, load_dataset_kwargs: Optional[Dict[str, Any]] = None, retrieval_kwargs: Optional[Dict[str, Any]] = None)[source]

Bases: KGQABaseDataset

The ComplexWebQuestions (CWQ) dataset of the “The Web as a Knowledge-base forAnswering Complex Questions” paper.

Parameters:
  • root (str) – Root directory where the dataset should be saved.

  • split (str, optional) – If "train", loads the training dataset. If "val", loads the validation dataset. If "test", loads the test dataset. (default: "train")

  • force_reload (bool, optional) – Whether to re-process the dataset. (default: False)

  • verbose (bool, optional) – Whether to print output. Defaults to False.

  • use_pcst (bool, optional) – Whether to preprocess the dataset’s graph with PCST or return the full graphs. (default: True)

  • load_dataset_kwargs (dict, optional) – Keyword arguments for the datasets.load_dataset function. (default: {})

  • retrieval_kwargs (dict, optional) – Keyword arguments for the get_features_for_triplets_groups function. (default: {})