MNBVC_META = {} base_url = 'https://huggingface.co/datasets/qbo-odp/MNBVC-core/resolve/main' def _flatten_list(input): res = [] for i in input: if type(i) == list: res += _flatten_list(i) else: res.append(i) return res # ============================= # gov_xuexiqiangguo MNBVC_META['gov_xuexiqiangguo'] = {} MNBVC_META['gov_xuexiqiangguo']['files'] = [f'{base_url}/gov/XueXiQiangGuo.jsonl.gz'] MNBVC_META['gov_xuexiqiangguo']['feature_type'] = "TEXT_CORPUS" MNBVC_META['gov_xuexiqiangguo']['description'] = "Texts from government files (XueXiQiangGuo)" # ============================= # gov_report MNBVC_META['gov_report'] = {} MNBVC_META['gov_report']['files'] = [f'{base_url}/gov/GovReport.jsonl.gz'] MNBVC_META['gov_report']['feature_type'] = "TEXT_CORPUS_LEGACY" MNBVC_META['gov_report']['description'] = "Texts from government files (Gov Report)" # ============================= # qa_mfa MNBVC_META['qa_mfa'] = {} MNBVC_META['qa_mfa']['files'] = [ [f'{base_url}/qa/mfa/0.jsonl.gz'] ] MNBVC_META['qa_mfa']['files'] = _flatten_list(MNBVC_META['qa_mfa']['files']) MNBVC_META['qa_mfa']['feature_type'] = "QA_CORPUS" MNBVC_META['qa_mfa']['description'] = "QA data from Ministry of Foreign Affairs" # ============================= # news_peoples_daily MNBVC_META['news_peoples_daily'] = {} MNBVC_META['news_peoples_daily']['files'] = [ [f'{base_url}/news/peoples_daily/{i}.jsonl.gz' for i in range(12)] ] MNBVC_META['news_peoples_daily']['files'] = _flatten_list(MNBVC_META['news_peoples_daily']['files']) MNBVC_META['news_peoples_daily']['feature_type'] = "TEXT_CORPUS" MNBVC_META['news_peoples_daily']['description'] = "News data from people's daily" # ============================= # qa_stackexchange MNBVC_META['qa_stackexchange'] = {} MNBVC_META['qa_stackexchange']['files'] = [] MNBVC_META['qa_stackexchange']['files'] += [ [f'{base_url}/qa/stackexchange/{i}.jsonl.gz' for i in range(1, 2)] ] MNBVC_META['qa_stackexchange']['files'] = _flatten_list(MNBVC_META['qa_stackexchange']['files']) MNBVC_META['qa_stackexchange']['feature_type'] = "QA_CORPUS" MNBVC_META['qa_stackexchange']['description'] = "QA data from StackExchange"