--- license: mit language: - en - fr - de - it - pt - nl - es pretty_name: Common Corpus size_categories: - n>1T task_categories: - text-generation tags: - legal - finance - literature - science - code --- # Common Corpus Common Corpus is the largest open and permissible licensed text dataset, comprising over 2 trillion tokens. It is a diverse dataset, consisting of books, newspapers, scientific articles, government and legal documents, code, and more. Common Corpus differs from existing open datasets in that it is: * **Truly Open**: contains only data that is permissively licensed * **Multilingual**: mostly representing English and French data, but contains data for XX languages * **Diverse**: consisting of scientific articles, government and legal documents, code, and cultural heritage data, including books and newspapers * **Extensively Curated**: spelling and formatting has been corrected from digitized texts, harmful and toxic content has been removed, and content with low educational content has also been removed. # About Common Corpus ## Sub-corpora | Collection | Domain | Sources | |----------------|--------------------------|-------------------------------------------------------------------------------------------| | OpenGovernment | legal and administrative | [Finance Commons](https://huggingface.co/collections/PleIAs/finance-commons-66925e1095c7fa6e6828e26c) (e.g. SEC, WTO) and Legal Commons (e.g. Europarl, Caselaw Access Project) | | OpenCulture | cultural heritage | public domain books and newspapers, Wikisource | | OpenScience | academic | OpenAlex, French theses | | OpenWeb | web text | [YouTube Commons](https://huggingface.co/datasets/PleIAs/YouTube-Commons), Stack Exchange | | OpenSource | code | GitHub | ## Summary Statistics ### By Sub-corpus ### By Language ## Dataset Structure
Data Fields * identifier: unique text identifier * text: post-processed text * char_count: number of UTF-8 characters in text * file_name: original file path, organized by collection * set_id: set id (1-10) * subset_id: subset id (1-100)

# How to Use ## Considerations for Using the Data All data in Common Corpus are permissibly licensed and may be used for both commercial and non-commercial purposes. The dataset is multilingual. The language text is included in the metadata, so data can be filtered by language. Additionally, some of the text data are historical. The year each text is written is included in the metadata, therefore it is possible to construct a dataset with a custom date cutoff if desired. ### Discussion of Bias Some of the dataset sources contain biased and toxic content, such as stereotypes about certain minoritized groups. We have removed texts which had high toxicity scores according to our toxicity classifier, [Celadon](https://huggingface.co/PleIAs/celadon), or which contain offensive terms and slurs. See our [preprint](https://arxiv.org/pdf/2410.22587) for more details. ### Personal and Sensitive Information We have attempted to remove personally identifiable information (PII). We primarily use [Microsoft Presidio](https://microsoft.github.io/presidio/), but make additional modifications to account for language- and country-specific considerations, such as European phone number formats. ## Use Common Corpus ``` from datasets import load_dataset data = load_dataset('PleIAs/common_corpus') ``` # Acknowledgements The corpus was stored and processed with the generous support of Scaleway. It was built up with the support and concerted efforts of the state start-up LANGU:IA (start-up d’Etat), supported by the French Ministry of Culture and DINUM, as part of the prefiguration of the service offering of the Alliance for Language technologies EDIC (ALT-EDIC). This dataset was also made in partnership with Wikimedia Enterprise. Corpus collection has been largely facilitated thanks to the open science LLM community insights, cooperation and support (Occiglot, Eleuther AI, OpenLLM France, Allen AI).