遇见数据集

theelderemo/genius-lyrics-cleaned

收藏
Hugging Face2026-03-09 更新2026-04-12 收录
官方服务:

资源简介:

--- dataset_info: features: - name: title dtype: string - name: artist dtype: string - name: tag dtype: string - name: year dtype: int64 - name: lyrics dtype: string splits: - name: train num_bytes: 4847179321 num_examples: 3179588 download_size: 2558825005 dataset_size: 4847179321 configs: - config_name: default data_files: - split: train path: data/train-* license: mit language: - en pretty_name: Genius English Song Lyrics – Cleaned & Deduplicated task_categories: - text-generation task_ids: - language-modeling tags: - lyrics - music - songs - rap - trap - pop - rb - rock - country - metal - folk - jazz - indie - electronic - reggae - soul - blues - english - fine-tuning - causal-lm - conditional-generation - song-generation - creative-writing - nlp - cleaned size_categories: - 1M<n<10M source_datasets: - carlosgdcj/genius-song-lyrics-with-language-information --- <div align="center"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 80" width="100%"> <defs> <linearGradient id="aat-g" x1="0%" y1="0%" x2="100%" y2="0%"> <stop offset="0%" stop-color="#7C3AED" stop-opacity="1"/> <stop offset="55%" stop-color="#7C3AED" stop-opacity="0.3"/> <stop offset="100%" stop-color="#7C3AED" stop-opacity="0"/> </linearGradient> </defs> <rect x="0" y="0" width="900" height="1.5" fill="url(#aat-g)"/> <rect x="0" y="0" width="4" height="80" fill="#7C3AED"/> <text x="888" y="72" font-family="Fira Code, Consolas, monospace" font-size="62" fill="#7C3AED" opacity="0.07" text-anchor="end">◎</text> <text x="20" y="42" font-family="Fira Code, Consolas, monospace" font-size="24" font-weight="700" fill="#e6edf3" letter-spacing="1.5">Genius Lyrics Dataset</text> <text x="20" y="62" font-family="Fira Code, Consolas, monospace" font-size="11" fill="#7C3AED" letter-spacing="2.5">Cleaned & Deduplicated</text> </svg> <div align="center"> <a href="https://huggingface.co/datasets/theelderemo/genius-lyrics-cleaned" target="_blank" rel="noopener noreferrer"> <svg xmlns="http://www.w3.org/2000/svg" width="110" height="20" style="margin: 0 4px 8px 0;" role="img" aria-label="🤗 Hugging Face"> <clipPath id="clip1"> <rect width="110" height="20" rx="3" fill="#fff"/> </clipPath> <g clip-path="url(#clip1)"> <rect width="110" height="20" fill="#161b22"/> </g> <g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11"> <text x="55" y="15" fill="#010101" fill-opacity=".3">🤗 Hugging Face</text> <text x="55" y="14">🤗 Hugging Face</text> </g> </svg> </a> <svg xmlns="http://www.w3.org/2000/svg" width="140" height="20" style="margin: 0 4px 8px 0;" role="img" aria-label="DOI: 10.57967/hf/7978"> <clipPath id="clip2"> <rect width="140" height="20" rx="3" fill="#fff"/> </clipPath> <g clip-path="url(#clip2)"> <rect width="140" height="20" fill="#161b22"/> </g> <g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11"> <text x="70" y="15" fill="#010101" fill-opacity=".3">DOI: 10.57967/hf/7978</text> <text x="70" y="14">DOI: 10.57967/hf/7978</text> </g> </svg> <svg xmlns="http://www.w3.org/2000/svg" width="115" height="20" style="margin: 0 4px 8px 0;" role="img" aria-label="revision: 9742989"> <clipPath id="clip3"> <rect width="115" height="20" rx="3" fill="#fff"/> </clipPath> <g clip-path="url(#clip3)"> <rect width="115" height="20" fill="#161b22"/> </g> <g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11"> <text x="57.5" y="15" fill="#010101" fill-opacity=".3">revision: 9742989</text> <text x="57.5" y="14">revision: 9742989</text> </g> </svg> </div> A heavily cleaned, English-only, genre-filtered subset of the [Genius Song Lyrics with Language Information](https://www.kaggle.com/datasets/carlosgdcj/genius-song-lyrics-with-language-information) Kaggle dataset. Reduced from **9+ GB to 2.56 GB** through language filtering, genre filtering, artifact removal, and deduplication. Optimized for language model fine-tuning, lyric generation, and music NLP research. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <line x1="0" y1="0" x2="800" y2="0" stroke="#cc0033" stroke-width="2"/> </svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">No train/validation/test splits</text> </svg> This dataset ships as a single `train` split. You should create validation and test splits appropriate to downstream task <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <line x1="0" y1="0" x2="800" y2="0" stroke="#cc0033" stroke-width="2"/> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Overview</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="4"/> </svg> <br> The raw Genius dataset contains millions of song entries across dozens of languages, genres, and quality levels — including non-music content like poetry, book excerpts, and miscellaneous text tagged as `misc`. This cleaned version retains only **English-language songs from verified music genres**, with lyrics scrubbed of Genius UI artifacts, HTML residue, and duplicates. The result is a high-signal corpus suitable for causal language model pretraining or supervised fine-tuning on lyric generation tasks. </svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Dataset Stats</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="2"/> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 332" width="100%"> <defs> <style> .th { font-family: Fira Code, Consolas, monospace; font-size: 13px; font-weight: 700; fill: #e6edf3; } .td-label { font-family: Fira Code, Consolas, monospace; font-size: 12px; fill: #e6edf3; } .td-value { font-family: Fira Code, Consolas, monospace; font-size: 12px; fill: #e6edf3; } </style> </defs> <!-- header row --> <rect x="0" y="0" width="800" height="28" rx="4" fill="#7C3AED" opacity="0.12"/> <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Metric</text> <text x="320" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Value</text> <line x1="0" y1="28" x2="800" y2="28" stroke="#7C3AED" stroke-width="1"/> <!-- rows --> <text x="20" y="52" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Total rows</text> <text x="320" y="52" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">3,179,588</text> <line x1="0" y1="60" x2="800" y2="60" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="82" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Dataset size</text> <text x="320" y="82" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">~4.51 GB</text> <line x1="0" y1="90" x2="800" y2="90" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="112" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Download size</text> <text x="320" y="112" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">~2.38 GB</text> <line x1="0" y1="120" x2="800" y2="120" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="142" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Split</text> <text x="320" y="142" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">train only</text> <line x1="0" y1="150" x2="800" y2="150" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="172" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Path</text> <text x="320" y="172" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">data/train-*</text> <line x1="0" y1="180" x2="800" y2="180" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="202" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">num_bytes</text> <text x="320" y="202" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">4847179321</text> <line x1="0" y1="210" x2="800" y2="210" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="232" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">num_examples</text> <text x="320" y="232" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">3179588</text> <line x1="0" y1="240" x2="800" y2="240" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="262" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">task_categories</text> <text x="320" y="262" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">text-generation</text> <line x1="0" y1="270" x2="800" y2="270" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="292" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">task_ids</text> <text x="320" y="292" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">anguage-modeling</text> <line x1="0" y1="300" x2="800" y2="300" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="322" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">size_categories</text> <text x="320" y="322" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">1M&lt;n&lt;10M</text> <line x1="0" y1="332" x2="800" y2="332" stroke="#7C3AED" stroke-width="1"/> </svg> <br> </svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Cleaning Pipeline</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="2"/> </svg> <br> **The following steps were applied in order:** </div> 1. **Language filter** — Retained only rows where `language == 'en'`, removing all non-English entries. 2. **Genre filter** — Dropped the `misc` tag (which contains books, poems, speeches, and other non-music content). Retained only the 15 confirmed music genre tags listed below. 3. **Artifact removal** — Applied regex cleaning to remove: - Genius embed counters (e.g., `1234Embed` at end of lyrics) - UI strings like `"See [Artist] Live"`, `"Get tickets"`, `"You might also like"` - Residual HTML tags (`<...>`) 4. **Section header normalization** — Simplified attributed headers: `[Chorus: Cam'ron & Jay-Z]` → `[Chorus]`, preserving verse structure while removing contributor meta. 5. **Whitespace normalization** — Collapsed 3+ consecutive newlines to 2, and collapsed horizontal whitespace. 6. **Stub removal** — Dropped any entry whose cleaned lyrics are under 100 characters. 7. **Exact deduplication** — Removed entries with identical cleaned lyrics. 8. **Near-deduplication** — For entries sharing the same `artist` + `title`, retained the version with the highest view count. <br > <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Data Structure</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="2"/> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 182" width="100%"> <defs> <style> .ds-th { font-family: Fira Code, Consolas, monospace; font-size: 13px; font-weight: 700; fill: #7C3AED; } .ds-label { font-family: Fira Code, Consolas, monospace; font-size: 12px; fill: #e6edf3; } .ds-type { font-family: Fira Code, Consolas, monospace; font-size: 12px; fill: #7C3AED; } .ds-desc { font-family: Fira Code, Consolas, monospace; font-size: 11px; fill: #8b949e; } </style> </defs> <rect x="0" y="0" width="800" height="28" rx="4" fill="#7C3AED" opacity="0.12"/> <text x="20" y="19" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Field</text> <text x="140" y="19" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Type</text> <text x="280" y="19" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Description</text> <line x1="0" y1="28" x2="800" y2="28" stroke="#7C3AED" stroke-opacity="0.3" stroke-width="1"/> <text x="20" y="52" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">title</text> <text x="140" y="52" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">string</text> <text x="280" y="52" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Song title as listed on Genius</text> <line x1="0" y1="60" x2="800" y2="60" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="82" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">artist</text> <text x="140" y="82" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">string</text> <text x="280" y="82" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Primary artist name</text> <line x1="0" y1="90" x2="800" y2="90" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="112" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">tag</text> <text x="140" y="112" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">string</text> <text x="280" y="112" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Genre tag (one of 15 values; see below)</text> <line x1="0" y1="120" x2="800" y2="120" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="142" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">year</text> <text x="140" y="142" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">float64</text> <text x="280" y="142" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Release year (may be NaN for entries with missing metadata)</text> <line x1="0" y1="150" x2="800" y2="150" stroke="#30363d" stroke-width="0.5"/> <text x="20" y="172" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">lyrics</text> <text x="140" y="172" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">string</text> <text x="280" y="172" <text x="20" y="19" font-family="Fira Code, Consolas, monospace" font-size="13px" font-weight="700" fill="#e6edf3">Cleaned, deduplicated lyrics with normalized section headers</text> <line x1="0" y1="182" x2="800" y2="182" stroke="#7C3AED" stroke-opacity="0.3" stroke-width="1"/> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 60" width="100%"> <text x="400" y="16" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#8b949e" text-anchor="middle">The dataset includes the following 15 genre values:</text> <text x="400" y="46" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#7C3AED" text-anchor="middle">rap · trap · pop · rb · rock · country · metal · folk · jazz · indie · electronic · reggae · soul · blues · latin</text> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Training Format</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="2"/> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 48" width="100%"> <text x="0" y="16" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#e6edf3">Each row's lyrics field contains plain cleaned lyrics with normalized section headers</text> <text x="0" y="36" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#e6edf3">([Verse 1], [Chorus], [Bridge], etc.). For models that benefit from soft conditioning,</text> <text x="0" y="48" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#e6edf3">you can reconstruct a prompt-formatted version of each example at training time:</text> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 210" width="100%"> <rect x="0" y="0" width="800" height="210" rx="6" fill="#161b22"/> <rect x="0" y="0" width="800" height="24" rx="6" fill="#1c2129"/> <rect x="0" y="12" width="800" height="12" fill="#1c2129"/> <circle cx="16" cy="12" r="5" fill="#cc0033" opacity="0.8"/> <circle cx="34" cy="12" r="5" fill="#e6a700" opacity="0.8"/> <circle cx="52" cy="12" r="5" fill="#3fb950" opacity="0.8"/> <text x="780" y="16" font-family="Fira Code, Consolas, monospace" font-size="10" fill="#8b949e" text-anchor="end">python</text> <text x="20" y="46" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#ff7b72">def</text> <text x="50" y="46" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#d2a8ff">format_training_example</text> <text x="226" y="46" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">(row):</text> <text x="40" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">year = </text> <text x="100" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#79c0ff">int</text> <text x="124" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">(row[</text> <text x="160" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#a5d6ff">'year'</text> <text x="206" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">]) </text> <text x="224" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#ff7b72">if</text> <text x="244" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3"> pd.notna(row[</text> <text x="352" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#a5d6ff">'year'</text> <text x="398" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">]) </text> <text x="416" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#ff7b72">else</text> <text x="452" y="66" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#a5d6ff"> 'Unknown'</text> <text x="40" y="86" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">header = (</text> <text x="60" y="106" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#a5d6ff">f"[Genre: {row['tag']}]\n"</text> <text x="60" y="126" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#a5d6ff">f"[Artist: {row['artist']}]\n"</text> <text x="60" y="146" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#a5d6ff">f"[Year: {year}]\n"</text> <text x="60" y="166" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#a5d6ff">f"[Title: {row['title']}]\n\n"</text> <text x="40" y="186" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">)</text> <text x="40" y="202" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#ff7b72">return</text> <text x="90" y="202" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">header + row[</text> <text x="192" y="202" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#a5d6ff">'lyrics'</text> <text x="248" y="202" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#e6edf3">]</text> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 20" width="100%"> <text x="0" y="14" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#8b949e">This soft-conditioning format allows models to learn genre, artist, and era as implicit style tokens without hard task prefixes.</text> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Token Length Distribution</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="2"/> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 56" width="100%"> <text x="0" y="16" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#e6edf3">Based on word-count proxies measured during cleaning:</text> <text x="14" y="36" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#8b949e">• The majority of entries fall under 512 words, well-suited for 512–1024 token context windows.</text> <text x="14" y="52" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#8b949e">• Setting max_seq_length=1024 captures the vast majority of examples without truncation.</text> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Sources</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="2"/> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 72" width="100%"> <rect x="0" y="0" width="4" height="72" fill="#7C3AED" opacity="0.5"/> <text x="20" y="20" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#7C3AED">carlosgdcj/genius-song-lyrics-with-language-information</text> <text x="20" y="36" font-family="Fira Code, Consolas, monospace" font-size="11" fill="#8b949e">~9+ GB (CSV) — Original Kaggle dataset with language detection metadata</text> <text x="20" y="56" font-family="Fira Code, Consolas, monospace" font-size="12" fill="#7C3AED">theelderemo/genius-lyrics-cleaned</text> <text x="20" y="72" font-family="Fira Code, Consolas, monospace" font-size="11" fill="#8b949e">~2.56 GB — Cleaned, English-only, genre-filtered subset</text> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 20" width="100%"> <text x="0" y="14" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#8b949e">The original dataset was collected by scraping Genius.com and includes language detection metadata alongside raw lyrics.</text> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Curation</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="2"/> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 56" width="100%"> <text x="0" y="16" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#e6edf3">The raw dataset is large and noisy. The misc category alone contributes a significant portion of</text> <text x="0" y="36" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#e6edf3">non-music content. Language diversity, while useful for multilingual tasks, is a source of noise for</text> <text x="0" y="52" font-family="Fira Code, Consolas, monospace" font-size="13" fill="#e6edf3">English-only modeling. This cleaned version provides a high-quality, ready-to-train English lyric corpus.</text> </svg> <br> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 50" width="100%"> <text x="400" y="34" font-family="Fira Code, Consolas, monospace" font-size="32" font-weight="700" fill="#e6edf3" letter-spacing="2" text-anchor="middle">Citation</text> <line x1="0" y1="48" x2="800" y2="48" stroke="#cc0033" stroke-width="2"/> </svg> <br> If you use this dataset in research or a project, please cite both the upstream Kaggle source and this repository: ```bibtex @misc{christopher_dickinson_2026, author = { Christopher Dickinson }, title = { genius-lyrics-cleaned (Revision 9742989) }, year = 2026, url = { https://huggingface.co/datasets/theelderemo/genius-lyrics-cleaned }, doi = { 10.57967/hf/7978 }, publisher = { Hugging Face } } ```

--- ### 数据集信息 #### 特征字段 1. **title**:歌曲标题,数据类型为字符串(string) 2. **artist**:艺术家名称,数据类型为字符串(string) 3. **tag**:音乐风格标签,数据类型为字符串(string) 4. **year**:发行年份,数据类型为64位整数(int64) 5. **lyrics**:歌词内容,数据类型为字符串(string) #### 数据划分 - 训练集(train):数据集字节数为4847179321,共包含3179588条示例 - 下载大小:2558825005字节 - 数据集实际大小:4847179321字节 #### 配置项 - 默认配置(default):数据文件路径为`data/train-*`,对应训练集划分。 #### 许可证 MIT许可证(MIT) #### 语言 英语(en) #### 友好名称 Genius英文歌词数据集——经清洗与去重处理(Genius English Song Lyrics – Cleaned & Deduplicated) #### 任务类别 文本生成(text-generation) #### 任务子类别 语言建模(language-modeling) #### 标签 歌词(lyrics)、音乐(music)、歌曲(songs)、说唱(rap)、陷阱节拍(trap)、流行音乐(pop)、R&B(rb)、摇滚(rock)、乡村音乐(country)、金属乐(metal)、民谣(folk)、爵士乐(jazz)、独立音乐(indie)、电子音乐(electronic)、雷鬼乐(reggae)、灵魂乐(soul)、蓝调(blues)、英语(english)、微调(fine-tuning)、因果语言模型(causal-lm)、条件生成(conditional-generation)、歌曲生成(song-generation)、创意写作(creative-writing)、自然语言处理(NLP, Natural Language Processing)、已清洗(cleaned) #### 规模类别 100万<样本数<1000万(1M<n<10M) #### 源数据集 carlosgdcj/genius-song-lyrics-with-language-information --- # Genius 歌词数据集 ## 经清洗与去重处理 (下方三个徽章分别为Hugging Face仓库链接、DOI编号与修订版本号:9742989) 本数据集为 Kaggle 平台上的 [Genius Song Lyrics with Language Information](https://www.kaggle.com/datasets/carlosgdcj/genius-song-lyrics-with-language-information) 数据集的重度清洗版英语专属子集,仅保留经过风格过滤的有效内容。通过语言筛选、风格过滤、冗余信息清理与去重操作,数据集体积从**9 GB以上**缩减至**2.56 GB**,专为大语言模型(Large Language Model, LLM)微调、歌词生成与音乐自然语言处理研究优化设计。 --- ### 无专属训练/验证/测试划分 本数据集仅提供单一`train`(训练)划分,使用者需根据下游任务需求自行构建验证集与测试集。 --- ### 数据集概览 原始Genius数据集包含数百万条歌曲条目,涵盖数十种语言、风格与质量层级,其中还包含诗歌、书籍节选等非音乐内容,这些内容被标记为`misc`(杂项)。本清洗版本仅保留**经过验证的音乐风格下的英语歌曲**,并清除了歌词中的Genius界面冗余信息、HTML残留代码与重复条目。最终得到的高质量语料库适用于因果语言模型(Causal Language Modeling, Causal LM)预训练,或歌词生成任务的监督微调。 --- ### 数据集统计信息 | 指标项 | 数值 | |----------------|--------------------------| | 总条目数 | 3,179,588 | | 数据集大小 | 约4.51 GB | | 下载大小 | 约2.38 GB | | 数据划分 | 仅训练集 | | 数据路径 | `data/train-*` | | 字节总数 | 4847179321 | | 示例总数 | 3179588 | | 任务类别 | 文本生成 | | 任务子类别 | 语言建模 | | 规模类别 | 100万<样本数<1000万 | --- ### 数据清洗流程 本数据集按以下顺序完成清洗步骤: 1. **语言筛选**:仅保留`language == 'en'`的条目,移除所有非英语内容。 2. **风格过滤**:移除`misc`(杂项)标签对应的内容(包含书籍、诗歌、演讲等非音乐内容),仅保留15种合法音乐风格标签。 3. **冗余信息清理**:通过正则表达式清除: - Genius嵌入计数器(例如歌词末尾的`1234Embed`) - 界面字符串,如`"See [Artist] Live"`、`"Get tickets"`、`"You might also like"` - 残留HTML标签(`<...>`格式) 4. **章节标题标准化**:简化带附加信息的标题,例如`[Chorus: Cam'ron & Jay-Z]` → `[Chorus]`,在保留段落结构的同时移除贡献者元信息。 5. **空白字符标准化**:将3个及以上连续换行符压缩为2个,并合并水平空白字符。 6. **短条目移除**:移除清洗后歌词长度少于100字符的条目。 7. **精确去重**:移除歌词内容完全一致的重复条目。 8. **近似去重**:对于`artist`(艺术家)与`title`(标题)均相同的条目,保留播放量最高的版本。 --- ### 数据结构 | 字段名 | 数据类型 | 描述 | |----------|------------------------|----------------------------------------------------------------------| | title | 字符串(string) | Genius平台上展示的歌曲标题 | | artist | 字符串(string) | 主艺术家名称 | | tag | 字符串(string) | 音乐风格标签,共15种可选值 | | year | 64位浮点数(float64) | 发行年份,元数据缺失时为NaN(非数值) | | lyrics | 字符串(string) | 经清洗、去重处理并标准化章节标题后的歌词内容 | 本数据集包含以下15种音乐风格标签: rap(说唱)、trap(陷阱说唱)、pop(流行音乐)、rb(R&B)、rock(摇滚)、country(乡村音乐)、metal(金属乐)、folk(民谣)、jazz(爵士乐)、indie(独立音乐)、electronic(电子音乐)、reggae(雷鬼乐)、soul(灵魂乐)、blues(蓝调)、latin(拉丁音乐) --- ### 训练格式 每条数据的`lyrics`字段包含已清洗且标准化章节标题(如`[Verse 1]`、`[Chorus]`、`[Bridge]`等)的纯文本歌词。对于需要软条件提示的模型,可在训练时自行将示例重构为提示格式: python def format_training_example(row): # 处理发行年份,缺失时替换为"Unknown" year = int(row['year']) if pd.notna(row['year']) else 'Unknown' # 构建提示头部 header = ( f"[Genre: {row['tag']}] " f"[Artist: {row['artist']}] " f"[Year: {year}] " f"[Title: {row['title']}] " ) # 返回拼接后的完整提示与歌词 return header + row['lyrics'] 这种软条件提示格式可让模型在无需硬编码任务前缀的情况下,自动学习音乐风格、艺术家与创作年代作为隐式风格Token(Token)。 --- ### Token长度分布 基于清洗阶段统计的词数近似值: - 绝大多数条目词数少于512,非常适配512~1024 Token(Token)的上下文窗口。 - 将最大序列长度(max_seq_length)设为1024时,可覆盖绝大多数示例而无需截断。 --- ### 数据来源 1. **carlosgdcj/genius-song-lyrics-with-language-information**:原始Kaggle数据集,体积约9+ GB(CSV格式),包含语言检测元数据与原始歌词,通过爬取Genius.com得到。 2. **theelderemo/genius-lyrics-cleaned**:本清洗后数据集,体积约2.56 GB,为英语专属、经风格过滤的子集。 原始数据集通过爬取Genius.com构建,包含语言检测元数据与原始歌词。 --- ### 数据整理说明 原始数据集体积庞大且包含大量噪声,仅`misc`(杂项)类别就包含了相当比例的非音乐内容。尽管语言多样性对多语言任务有益,但对于英语专属建模任务而言却是噪声来源。本清洗版本提供了高质量、可直接用于训练的英语歌词语料库。 --- ### 引用方式 若您在研究或项目中使用本数据集,请同时引用上游Kaggle源与本仓库: bibtex @misc{christopher_dickinson_2026, author = { Christopher Dickinson }, title = { genius-lyrics-cleaned (Revision 9742989) }, year = 2026, url = { https://huggingface.co/datasets/theelderemo/genius-lyrics-cleaned }, doi = { 10.57967/hf/7978 }, publisher = { Hugging Face } }

提供机构:
theelderemo
二维码
社区交流群
二维码
科研交流群
商业服务