|
--- |
|
dataset_info: |
|
config_name: '20231001' |
|
features: |
|
- name: id |
|
dtype: string |
|
- name: url |
|
dtype: string |
|
- name: title |
|
dtype: string |
|
- name: text |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: 13647957 |
|
num_examples: 9827 |
|
download_size: 8803739 |
|
dataset_size: 13647957 |
|
configs: |
|
- config_name: '20231001' |
|
data_files: |
|
- split: train |
|
path: 20231001/train-* |
|
license: cc-by-sa-3.0 |
|
task_categories: |
|
- text-generation |
|
language: |
|
- zh |
|
size_categories: |
|
- 1K<n<10K |
|
--- |
|
# Dataset Card for "wikinews-zhtw" |
|
|
|
維基新聞(英文:Wikinews)是由一群志願者、即民間記者運營的網路媒體。同時是一個自由內容的維基,屬維基媒體計劃項目,由維基媒體基金會負責運營。維基新聞通過協作新聞學的工作模式去運行,同時亦努力通過中性的觀點報導新聞,包括原創一手獨家報道和採訪。 |
|
|
|
這個數據集是根據 Wikipedia dumps (https://dumps.wikimedia.org/) 裡頭 `zhwikinews` 的中文下載檔案來建構的。每個範例都包含一篇完整的維基新聞文章的內容,並經過清理以去除不需要的部分。 |
|
|
|
- **Homepage:** [https://dumps.wikimedia.org](https://dumps.wikimedia.org) |
|
- **zhwiki 下載點:** [https://dumps.wikimedia.org/zhwikinews](https://dumps.wikimedia.org/zhwikinews/) |
|
|
|
## 數據 Dump 版本 |
|
|
|
由於維基百科數據集定期會進行網站數據拋轉,在 `2023/10/10` 的時間點去查看時會有下列的數據可供下載: |
|
|
|
|數據 Dump 目錄|拋轉時間點| |
|
|-------------|--------| |
|
|`20230520/`|01-Jul-2023 09:28| |
|
|`20230601/`|20-Jul-2023 09:41| |
|
|`20230620/`|01-Aug-2023 09:35| |
|
|`20230701/`|20-Aug-2023 09:49| |
|
|`20230720/`|01-Sep-2023 09:35| |
|
|`20230801/`|20-Sep-2023 09:46| |
|
|`20230820/`|01-Oct-2023 09:42| |
|
|`20230901/`|02-Sep-2023 14:47| |
|
|`20230920/`|21-Sep-2023 14:41| |
|
|`20231001/`|10-Oct-2023 03:50| |
|
|`latest/`|10-Oct-2023 03:50| |
|
|
|
本數據集會定期去取得最近有明確的日期來進行下載與清理,便於驗證與使用。 |
|
|
|
## 數據下載清理 |
|
|
|
1. 下載 zhwiki 的 data dump 檔案 |
|
2. 使用 [WikiExtractor](https://github.com/attardi/wikiextractor) 套件來進行文件內容萃取 |
|
3. 進行數據清理并轉換成 jsonl 格式檔案 |
|
4. 使用 Huggingface [Datasets](https://pypi.org/project/datasets/) 套件來載入 jsonl 并上傳至 Huggingface Hub |
|
|
|
## 資料集結構 |
|
|
|
範例如下: |
|
|
|
{'id': '35', |
|
'url': 'https://zh.wikinews.org/wiki?curid=35', |
|
'title': 'EDWIN與CUELLO遭統一獅隊解約', |
|
'text': '曾經打過中國棒球聯賽的兩位外援球員EDWIN(臺譯:愛力)與CUELLO(臺譯:阿-{A|裡}-),昨天傳出...' |
|
} |
|
|
|
## 資料欄位 |
|
|
|
所有配置中的資料欄位都是相同的: |
|
|
|
- `id (str)`: 文章的 ID。 |
|
- `url (str)`: 文章的 URL。 |
|
- `title (str)`: 文章的標題。 |
|
- `text (str)`: 文章的文字內容。 |
|
|
|
## 使用 |
|
|
|
```python |
|
from datasets import load_dataset |
|
|
|
# 請在第二個參數去指定要使用的數據 dump 的日期 |
|
load_dataset("erhwenkuo/wikinews-zhtw", "20231001") |
|
``` |
|
|
|
## 許可資訊 |
|
|
|
維基百科的大部分文章內容及其許多圖像均根據 `Creative Commons Attribution-ShareAlike 3.0 Unported License (CC BY-SA)` 和 `GNU Free Documentation License (GFDL)` 共同授權。 |
|
|
|
## Citation |
|
|
|
``` |
|
@ONLINE{wikidump, |
|
author = "Wikimedia Foundation", |
|
title = "Wikimedia Downloads", |
|
url = "https://dumps.wikimedia.org" |
|
} |
|
``` |