CoolFace
Datasetpublic

RealTimeData/bbc_alltime

This dataset contains BBC News articles from 2017 to 2022. The articles are arraged by month. Access the specific month by using the format "YYYY-MM" as config. Such as load_dataset("RealTimeData/bbc_alltime", "2021-1").

sourceHugging Facecc-by-2.0updated 3y agoView on Hugging Face
0likes332downloads
get_configs.py11 linesDownload Raw Back to root
1import glob2import os3 4all_articles = glob.glob('./articles/*.json')5file_names = [os.path.splitext(os.path.basename(path))[0] for path in all_articles]6_TIMES = sorted(file_names) + ['all']7 8# Write the string to a Python file9with open('configs.txt', 'w') as file:10    for time in _TIMES:11        file.write(time + '\n')