SivilTaram
commited on
Commit
•
d870c3a
1
Parent(s):
845d1b4
Update README.md
Browse files
README.md
CHANGED
@@ -21,3 +21,172 @@ configs:
|
|
21 |
- split: train
|
22 |
path: data/train-*
|
23 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
- split: train
|
22 |
path: data/train-*
|
23 |
---
|
24 |
+
|
25 |
+
# Dataset Card for StarCoder2-Documentation
|
26 |
+
|
27 |
+
This dataset is the code documenation dataset used in [StarCoder2](https://huggingface.co/papers/2402.19173) pre-training, and it is also part of the-stack-v2-train-extras descried in the paper.
|
28 |
+
|
29 |
+
## Dataset Details
|
30 |
+
|
31 |
+
### Overview
|
32 |
+
|
33 |
+
This dataset comprises a comprehensive collection of crawled documentation and code-related resources sourced from various package manager platforms and programming language documentation sites. It focuses on popular libraries, free programming books, and other relevant materials, facilitating research in software development, programming language trends, and documentation analysis.
|
34 |
+
|
35 |
+
### Sources
|
36 |
+
1. **Package Managers:**
|
37 |
+
- **npm:** Node.js package manager.
|
38 |
+
- **PyPI:** Python Package Index.
|
39 |
+
- **Go Packages:** Go programming language packages.
|
40 |
+
- **Packagist:** PHP package repository.
|
41 |
+
- **Rubygems:** Ruby package manager.
|
42 |
+
- **Cargo:** Rust package manager.
|
43 |
+
- **CocoaPods:** Dependency manager for Swift and Objective-C Cocoa projects.
|
44 |
+
- **Bower:** Front-end package manager.
|
45 |
+
- **CPAN:** Comprehensive Perl Archive Network.
|
46 |
+
- **Clojars:** Clojure library repository.
|
47 |
+
- **Conda:** Package manager for data science and scientific computing.
|
48 |
+
- **Hex:** Package manager for the Elixir programming language.
|
49 |
+
- **Julia:** Package manager for the Julia programming language.
|
50 |
+
|
51 |
+
2. **Documentation Websites:**
|
52 |
+
- A carefully curated list of programming-related websites, including Read the Docs and other well-known resources.
|
53 |
+
|
54 |
+
3. **Free Programming Books:**
|
55 |
+
- Sources from the **Free Programming Books** project, which promotes the availability of free programming e-books across various languages.
|
56 |
+
|
57 |
+
|
58 |
+
### Data Collection Process
|
59 |
+
|
60 |
+
1. **Library Retrieval:**
|
61 |
+
- The process begins by identifying the most popular libraries across the aforementioned platforms using [libraries.io](libraries.io).
|
62 |
+
- These library names serve as search queries to obtain their respective homepages.
|
63 |
+
|
64 |
+
2. **Documentation Extraction:**
|
65 |
+
- **Homepage Links:** Documentation files are crawled from the retrieved homepage links. If no dedicated documentation is found, README or equivalent files on the package manager platforms are utilized.
|
66 |
+
- **Processing Strategy:** For documents obtained through homepage links, the same processing strategy is applied as outlined for website crawls, ensuring consistent formatting and extraction quality.
|
67 |
+
- **Prioritization:** For libraries hosted on PyPI and Conda, documentation on [Read the Docs](https://about.readthedocs.com/) is prioritized due to its comprehensive nature.
|
68 |
+
|
69 |
+
3. **PDF Extraction:**
|
70 |
+
- For R language documentation, text is extracted from all PDFs hosted on **CRAN** using the **pdftotext** library, which effectively preserves formatting.
|
71 |
+
- For LaTeX packages, documentation, tutorials, and usage guide PDFs from **CTAN** are filtered, excluding image-heavy PDFs, and converted to markdown using the **Nougat** neural OCR tool.
|
72 |
+
|
73 |
+
4. **Web Crawling:**
|
74 |
+
- Code documentation is collected from a curated list of websites by exploring from an initial URL, and the full list of all URLs can be found in the StarCoder2 paper.
|
75 |
+
- A dynamic queue is employed to store URLs within the same domain, expanding as new links are discovered during the crawl.
|
76 |
+
- The process focuses on (1) **content extraction** and (2) **content concatenation**:
|
77 |
+
- **Content Extraction:** HTML pages are converted to XML using the **trafilatura** library, which eliminates redundant navigation elements.
|
78 |
+
- **Content Concatenation:** Extracted content from different HTML pages is subjected to near-duplication checks using the **minhash locality-sensitive hashing** technique, applying a threshold of 0.7 to ensure unique content is retained.
|
79 |
+
|
80 |
+
5. **Free Textbooks:**
|
81 |
+
- The dataset includes free programming books collected from the [Free Programming Books Project](https://github.com/EbookFoundation/free-programming-books). Links with a PDF extension are extracted, and all available PDFs are downloaded and processed for text extraction using the **pdf2text** library.
|
82 |
+
|
83 |
+
6. **Language Identification:**
|
84 |
+
- A dual approach is utilized to identify the primary programming language of each document:
|
85 |
+
- **Predefined Rules:** Applied when the document's source explicitly corresponds to a specific programming language.
|
86 |
+
- **Guesslang Library:** Used in cases where the correspondence is not clear.
|
87 |
+
|
88 |
+
### Dataset Characteristics
|
89 |
+
|
90 |
+
- **Languages Covered:** English, Chinese, Japanese, Spanish, and others.
|
91 |
+
- **Document Types:**
|
92 |
+
- Code documentation files
|
93 |
+
- PDF documents
|
94 |
+
- HTML pages
|
95 |
+
- E-books
|
96 |
+
- **Programming Languages Included:**
|
97 |
+
- Python
|
98 |
+
- JavaScript
|
99 |
+
- Rust
|
100 |
+
- R
|
101 |
+
- Go
|
102 |
+
- PHP
|
103 |
+
- Ruby
|
104 |
+
- Haskell
|
105 |
+
- Objective-C
|
106 |
+
- SQL
|
107 |
+
- YAML
|
108 |
+
- TeX
|
109 |
+
- Markdown
|
110 |
+
- And more...
|
111 |
+
|
112 |
+
### Use Cases
|
113 |
+
- Analyzing trends in programming language documentation.
|
114 |
+
- Researching software development resources across multiple platforms.
|
115 |
+
- Training large language models on documentation datasets to better understand programming languages.
|
116 |
+
- Understanding the structure and accessibility of programming documentation.
|
117 |
+
|
118 |
+
|
119 |
+
## Citation
|
120 |
+
|
121 |
+
```bibtex
|
122 |
+
@article{DBLP:journals/corr/abs-2402-19173,
|
123 |
+
author = {Anton Lozhkov and
|
124 |
+
Raymond Li and
|
125 |
+
Loubna Ben Allal and
|
126 |
+
Federico Cassano and
|
127 |
+
Joel Lamy{-}Poirier and
|
128 |
+
Nouamane Tazi and
|
129 |
+
Ao Tang and
|
130 |
+
Dmytro Pykhtar and
|
131 |
+
Jiawei Liu and
|
132 |
+
Yuxiang Wei and
|
133 |
+
Tianyang Liu and
|
134 |
+
Max Tian and
|
135 |
+
Denis Kocetkov and
|
136 |
+
Arthur Zucker and
|
137 |
+
Younes Belkada and
|
138 |
+
Zijian Wang and
|
139 |
+
Qian Liu and
|
140 |
+
Dmitry Abulkhanov and
|
141 |
+
Indraneil Paul and
|
142 |
+
Zhuang Li and
|
143 |
+
Wen{-}Ding Li and
|
144 |
+
Megan Risdal and
|
145 |
+
Jia Li and
|
146 |
+
Jian Zhu and
|
147 |
+
Terry Yue Zhuo and
|
148 |
+
Evgenii Zheltonozhskii and
|
149 |
+
Nii Osae Osae Dade and
|
150 |
+
Wenhao Yu and
|
151 |
+
Lucas Krau{\ss} and
|
152 |
+
Naman Jain and
|
153 |
+
Yixuan Su and
|
154 |
+
Xuanli He and
|
155 |
+
Manan Dey and
|
156 |
+
Edoardo Abati and
|
157 |
+
Yekun Chai and
|
158 |
+
Niklas Muennighoff and
|
159 |
+
Xiangru Tang and
|
160 |
+
Muhtasham Oblokulov and
|
161 |
+
Christopher Akiki and
|
162 |
+
Marc Marone and
|
163 |
+
Chenghao Mou and
|
164 |
+
Mayank Mishra and
|
165 |
+
Alex Gu and
|
166 |
+
Binyuan Hui and
|
167 |
+
Tri Dao and
|
168 |
+
Armel Zebaze and
|
169 |
+
Olivier Dehaene and
|
170 |
+
Nicolas Patry and
|
171 |
+
Canwen Xu and
|
172 |
+
Julian J. McAuley and
|
173 |
+
Han Hu and
|
174 |
+
Torsten Scholak and
|
175 |
+
S{\'{e}}bastien Paquet and
|
176 |
+
Jennifer Robinson and
|
177 |
+
Carolyn Jane Anderson and
|
178 |
+
Nicolas Chapados and
|
179 |
+
et al.},
|
180 |
+
title = {StarCoder 2 and The Stack v2: The Next Generation},
|
181 |
+
journal = {CoRR},
|
182 |
+
volume = {abs/2402.19173},
|
183 |
+
year = {2024},
|
184 |
+
url = {https://doi.org/10.48550/arXiv.2402.19173},
|
185 |
+
doi = {10.48550/ARXIV.2402.19173},
|
186 |
+
eprinttype = {arXiv},
|
187 |
+
eprint = {2402.19173},
|
188 |
+
timestamp = {Tue, 06 Aug 2024 08:17:53 +0200},
|
189 |
+
biburl = {https://dblp.org/rec/journals/corr/abs-2402-19173.bib},
|
190 |
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
191 |
+
}
|
192 |
+
```
|