The viewer is disabled because this dataset repo requires arbitrary Python code execution. Please consider removing the loading script and relying on automated data support (you can use convert_to_parquet from the datasets library). If this is not possible, please open a discussion for direct help.

kubhist2

Dataset Summary

This is a version of the Kubhist 2 dataset originally created, curated and made available by Språkbanken Text (SBX) at the University of Gothenburg (Sweden) under the CC BY 4.0 license. This is a corpus of OCRed newspapers from Sweden spanning the 1640s to the 1900s. The original data is available with many types of annotation in XML at https://spraakbanken.gu.se/en/resources/kubhist2. A good description of the original data is available in this blog entry by Dana Dannélls: https://spraakbanken.gu.se/blogg/index.php/2019/09/15/the-kubhist-corpus-of-swedish-newspapers/.

If you use this dataset for academic research, cite it using the provided citation information at the bottom of this page.

In a nutshell, this huggingface dataset version offers:

  • only the OCRed text
  • available in decadal subsets
  • one line per sentence, sentences shorter than 4 words were discarded

In total this dataset contains 2,819,065,590 tokens. A distribution of tokens per decade is available below.

License is CC BY 4.0 ShareAlike.

(env) simon@terminus:/mnt/user/cik/kubhist2 wc -w text/*/*.txt
      39348 text/1640/1640.txt
       4700 text/1650/1650.txt
       8524 text/1660/1660.txt
       2396 text/1670/1670.txt
     199670 text/1680/1680.txt
     487943 text/1690/1690.txt
     619884 text/1700/1700.txt
     265930 text/1710/1710.txt
     355759 text/1720/1720.txt
     856218 text/1730/1730.txt
    1589508 text/1740/1740.txt
    2211316 text/1750/1750.txt
    5496545 text/1760/1760.txt
   14434932 text/1770/1770.txt
   22366170 text/1780/1780.txt
   26768856 text/1790/1790.txt
   36225842 text/1800/1800.txt
   44510588 text/1810/1810.txt
   65571094 text/1820/1820.txt
   95359730 text/1830/1830.txt
  143992956 text/1840/1840.txt
  214538699 text/1850/1850.txt
  392672066 text/1860/1860.txt
  524802728 text/1870/1870.txt
  695859650 text/1880/1880.txt
  498244203 text/1890/1890.txt
   31580335 text/1900/1900.txt
 2819065590 total

Languages

Swedish (nysvenska)

Dataset Structure

One feature: text.

Load the whole corpus using

dataset = load_dataset("ChangeIsKey/kubhist2")

or a decadal subset using

dataset = load_dataset("ChangeIsKey/kubhist2", "decade")

The decade must be a string, valid values are within range(1640, 1910, 10).

You can combine several decades using concatenate_datasets like this:

from datasets import load_dataset, concatenate_datasets

ds_1800 = load_dataset("ChangeIsKey/kubhist2", "1800")
ds_1810 = load_dataset("ChangeIsKey/kubhist2", "1810")
ds_1820 = load_dataset("ChangeIsKey/kubhist2", "1820")

ds_1800_1820 = concatenate_datasets([
                        ds_1800["train"],
                        ds_1810["train"],
                        ds_1820["train"]
                        ])

Despite what the huggingface dataset viewer states the all config has 285.4M (285,384,149 to be precise) rows, not 77.9M.

Data Splits

The dataset has only one split, train.

Dataset Creation

Curation Rationale

The original data is in a highly-annotated XML format not ideally suited for basic NLP tasks such as unsupervised language modeling: information such as page numbers, fonts, etc. is less relevant and has thus been discarded. Keeping only the running text of the newspaper and removing sentences shorter than 4 words further allows a 150x data size reduction (2.4TB --> 16GB).

Source Data

The original data is available with many types of annotation in XML at https://spraakbanken.gu.se/en/resources/kubhist2.

Initial Data Collection and Normalization

See on Språkbanken Text's website.

Who are the source language producers?

Språkbanken Text: https://spraakbanken.gu.se/en/

Personal and Sensitive Information

This is historical newspaper data, with the latest data published in 1909. Everyone mentioned in this dataset was probably already a public figure, and has been dead for a while.

Considerations for Using the Data

Discussion of Biases

This is historical data. As such, outdated views might be present in the data.

Other Known Limitations

The data comes from an OCR process. The text is thus not perfect, especially so in the earlier decades.

Additional Information

Dataset Curators

This huggingface version of the data has been created by Simon Hengchen.

Licensing Information

Creative Commons Attribution Share Alike 4.0: https://creativecommons.org/licenses/by-sa/4.0/

Citation Information

You should always cite the original kubhist2 release, provided below as bibtex. If you want to additionally refer to this specific version, please also add a link to the huggingface page: https://huggingface.co/datasets/ChangeIsKey/kubhist2.

@misc{Kubhist2,
  title = {The Kubhist Corpus, v2},
  url = {https://spraakbanken.gu.se/korp/?mode=kubhist},
  author = {Spr{\aa}kbanken},
  year = {Downloaded in 2019}, 
  organization = {Department of Swedish, University of Gothenburg}
}

Acknowledgments

This dataset has been created in the context of the ChangeIsKey! project funded by Riksbankens Jubileumsfond under reference number M21-0021, Change is Key! program. The compute dedicated to the creation of the dataset has been provided by iguanodon.ai.

Many thanks got to Språkbanken Text for creating and curating this resource.

Downloads last month
0

Models trained or fine-tuned on iguanodon-ai/kubhist2