File size: 731 Bytes
1ab607b 6cc2785 8cbe332 5516d69 8472d60 d3d09b9 8472d60 5516d69 6cc2785 d3d09b9 6cc2785 e219b0c 1ab607b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
#!/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
|