| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| from datasets import load_dataset, DownloadMode | |
| dataset = load_dataset( | |
| "spam_detect.py", | |
| # name="enron_spam", | |
| # name="enron_spam_subset", | |
| # name="ling_spam", | |
| # name="sms_spam", | |
| # name="spam_assassin", | |
| # name="spam_detection", | |
| # name="sms_spam_collection", | |
| # name="spam_message", | |
| # name="spam_message_lr", | |
| name="youtube_spam_collection", | |
| split="train", | |
| cache_dir=None, | |
| download_mode=DownloadMode.FORCE_REDOWNLOAD | |
| ) | |
| for sample in dataset: | |
| text = sample["text"] | |
| label = sample["label"] | |
| # if label == "spam": | |
| # continue | |
| print(text) | |
| print(label) | |
| print("-" * 12) | |
| if __name__ == '__main__': | |
| pass | |