SenticGCNDatasetGenerator¶
-
class
SenticGCNDatasetGenerator
(config: sgnlp.models.sentic_gcn.data_class.SenticGCNTrainArgs, tokenizer: transformers.tokenization_utils.PreTrainedTokenizer, mode: str = 'train')[source]¶ Main dataset generator class to preprocess raw dataset file. Set mode to ‘train’ to generate dataset for training. Set mode to ‘test’ to generate dataset for training from eval_args.
-
generate_datasets
() → Tuple[sgnlp.models.sentic_gcn.utils.SenticGCNDataset, sgnlp.models.sentic_gcn.utils.SenticGCNDataset, sgnlp.models.sentic_gcn.utils.SenticGCNDataset][source]¶ Main wrapper method to generate datasets for both SenticGCN and SenticGCNBert based on config.
- Returns
return SenticGCNDataset instances for train/val/test data.
- Return type
-
generate_test_datasets
() → sgnlp.models.sentic_gcn.utils.SenticGCNDataset[source]¶ Main wrapper method to generate test datasets for both SenticGCN and SenticGCNBert based on eval config.
- Returns
return SenticGCNDataset instance for test datasets
- Return type
-