DOI: 10.5281/zenodo.14858279
title: Wiki-Quantities and Wiki-Measurements: Datasets of Quantities and their Measurement Context from Wikipedia

description: The task of measurement extraction (or quantitative information extraction) is typically approached in a pipeline manner, where 1) quantities are identified before 2) their individual measurement context is extracted (see our review paper). To support the development and evaluation of systems for measurement extraction, we present two large datasets that correspond to the two tasks:



Wiki-Quantities, a dataset for identifying quantities, and

Wiki-Measurements, a dataset for extracting measurement context for given quantities.


The datasets are heuristically generated from Wikipedia articles and Wikidata facts. Citation and reference spans sampled from the S2ORC dataset are randomly added to the examples in Wiki-Quantities to make models trained on the data more robust to numerals appearing outside of quantities in scientific texts. For a detailed description of the datasets, please refer to the upcoming corresponding paper: 

Wiki-Quantities and Wiki-Measurements: Datasets of Quantities and their Measurement Context from Wikipedia. 2025. Jan Göpfert, Patrick Kuckertz, Jann M. Weinand, and Detlef Stolten.

Versions

The datasets are released in different versions:



Processing level: the pre-processed versions can be used directly for training and evaluating models, while the raw versions can be used to create custom pre-processed versions or for other purposes. Wiki-Quantities is pre-processed for IOB sequence labeling, while Wiki-Measurements is pre-processed for SQuAD-style generative question answering.

Filtering level: 



Wiki-Quantities is available in a raw, large, small, and tiny version: The raw version is the original version, which includes all the samples originally obtained. In the large version, all duplicates and near duplicates present in the raw version are removed. The small and tiny versions are subsets of the large version which are additionally filtered to balance the data with respect to units, properties, and topics.

Wiki-Measurements is available in a large`, small, large_strict, small_strict, small_context, and large_strict_context version: The large version contains all examples minus a few duplicates. The small version is a subset of the large version with very similar examples removed. In the context versions, additional sentences are added around the annotated sentence. In the strict versions, the quantitative facts are more strictly aligned with the text.



Quality: all data has been automatically annotated using heuristics. In contrast to the silver data, the gold data has been manually curated.


Format

The datasets are stored in JSON files and are available in a pre-processed version and a raw version. The respective pre-processed version is formatted for direct use in NLP frameworks such as Huggingface Transformers, while the raw version is provided in two formats: one with character offsets and one with emojis to visualize the annotations and facilitate curation. Below, we provide examples of the different formats for both datasets.

Wiki-Quantities

Example from the raw version in the format that uses character offsets to indicate the start and end of the annotated spans:

{
    "id": 52633,
    "source": "Suldal (en:178082)",
    "text": "The finished hydroelectric complex has a total capacity of approximately 2,100 megawatts and produces about 4.8 terawatt-hours yearly (Figure S2).",
    "quantities": [[73, 88], [108, 126]],
    "correct": null
}

source indicates the source Wikipedia page of the example text. correct indicates the curation status: if set to true, the quantity annotations were considered correct during manual curation; if set to false, the quantity annotations were considered incorrect; if set to null, no manual curation was performed. Note that quantity modifiers are not included in the quantity spans.

Example from the raw version in the format that uses emojis to mark annotations:

{
    "id": 52633,
    "source": "Suldal (en:178082)",
    "text": "The finished hydroelectric complex has a total capacity of approximately 🍏2,100 megawatts🍏 and produces about 🍏4.8 terawatt-hours🍏 yearly (Figure S2).",
    "correct": null
}

Here, quantities are enclosed in 🍏 emojis. 

Example from the version pre-processed for IOB sequence labeling:

{
    "target": "Suldal (en:178082)",
    "tokens": ["The", "finished", "hydroelectric", "complex", "has", "a", "total", "capacity", "of", "approximately", "2,100", "megawatts", "and", "produces", "about", "4.8", "terawatt", "-", "hours", "yearly", "(", "Figure", "S2", ")", "."],
    "ner_tags": [ "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "B-Quantity", "I-Quantity", "O", "O", "O", "B-Quantity", "I-Quantity", "I-Quantity", "I-Quantity", "O", "O", "O", "O", "O", "O"
    ]
}

Wiki-Measurements

Example from the raw version in the format that uses character offsets to indicate the start and end of the annotated spans:

{
    "id": 28066,
    "source": "Colongra Power Station (en:25606789)",
    "text": "Colongra Gas Generation Plant (also known as Colongra Power Station) is a 667 MW gas-fired power station located in Colongra, New South Wales, Australia and is the largest gas-fired power station in New South Wales.",
    "quantitative_statement": {
        "entity": {"explicit": [[0, 68]]},
        "property": {"explicit": [], "implicit": "installed capacity"},
        "value": {"explicit": [[74, 77]]},
        "unit": {"explicit": [[78, 80]]},
        "location": {"explicit": [[116, 152]]}
    },
    "curation": {
        "quantity_entity_property_correct": true,
        "spatio_temporal_scope_correct": true,
        "qualifiers_correct": true
    }
}

If the measured property is explicitly stated in the text it is annotated using character offsets and the implicit property field is kept empty. If the measured property is implicit, it is specified as a string in the implicit property field. The implicit property field can optionally be used in conjunction with an explicit property annotation, to correct its spelling, improve its meaningfulness, or adapt its inflection (e.g., "length" instead of "long"). All other annotations are explicitly annotated using character offsets. While the entity, property, value, and unit annotations are mandatory, they can be empty if no corresponding span is found in the text. The annotation of qualifiers and quantity modifiers is optional. If quantity_entity_property_correct is set to true, the quantity, entity, and property annotations were considered correct during manual curation. If spatio_temporal_scope_correct is true, the temporal and spatial scope were considered correct. If qualifiers_correct is true, all qualifiers were considered correct. If any of the three fields is false or null, the corresponding annotations were considered incorrect or no manual curation was performed, respectively.

Equivalent example from the raw version in the format that uses emojis to mark annotations:

{
    "id": 28066,
    "source": "Colongra Power Station (en:25606789)",
    "text": "🌶️Colongra Gas Generation Plant (also known as Colongra Power Station)🌶️ is a 🍐667🍐 🍓MW🍓 gas-fired power station located in 📍Colongra, New South Wales, Australia📍 and is the largest gas-fired power station in New South Wales.",
    "implicit_property": "installed capacity",
    "curation": {
        "quantity_entity_property_correct": true,
        "spatio_temporal_scope_correct": true,
        "qualifiers_correct": true
    }
}

The value spans are marked with 🍐, the unit spans with 🍓, the property spans with 🍊, the entity spans with 🌶️, and the spatial scope with 📍. The full mapping from emojis to annotation types is given below.



./Wiki-Measurements/raw/additional_data.json provides additional information about the example, including the Wikidata fact with URIs for its items, as well as the URL of the respective Wikipedia article. Additionally, the text surrounding the example sentence is provided. If not all quality criteria were met when matching the Wikidata fact to the Wikipedia article, the reasons why the example was accepted anyway are provided. The additional data given for the above example is:



{
    "id": 28066,
    "target": "Colongra Power Station (en:25606789)",
    "context": {
        "before": [],
        "after": ["It will generally be used during peak demand periods in [...]"]    },
    "wikidata_fact": {
        "entity": "http://www.wikidata.org/entity/Q5148195",
        "property": "http://www.wikidata.org/entity/P2109",
        "value": "667",
        "value_lowerbound": null,
        "value_upperbound": null,
        "unit": "http://www.wikidata.org/entity/Q6982035",
        "qualifiers": [""],
        "qualifier_values": [""],
        "qualifier_lowerbounds": [""],
        "qualifier_upperbounds": [""],
        "qualifier_units": [""],
        "qualifier_time_precisions": [""],
        "article": "https://en.wikipedia.org/wiki/Colongra_Power_Station"    },
    "weak_accept_reasons": ["no_property_but_rare_num_exact_match"]
}



Equivalent examples from the version pre-processed for SQuAD-style, multi-turn, generative question answering:

{
    "id": "1403",
    "title": "Colongra Power Station (en:25606789)",
    "context": "Colongra Gas Generation Plant (also known as Colongra Power Station) is a $667 MW$ gas-fired power station located in Colongra, New South Wales, Australia and is the largest gas-fired power station in New South Wales.",
    "question": "Which property or quality is characterized by 667 MW?",
    "answers": {"text": ["installed capacity"], "answer_start": [-1]}
},
{
    "id": "1404",
    "title": "Colongra Power Station (en:25606789)",
    "context": "Colongra Gas Generation Plant (also known as Colongra Power Station) is a $667 MW$ gas-fired power station located in Colongra, New South Wales, Australia and is the largest gas-fired power station in New South Wales.",
    "question": "Which entity's installed capacity is characterized by 667 MW?",
    "answers": {"text": ["Colongra Gas Generation Plant (also known as Colongra Power Station)"], "answer_start": [0]}
},
{
    "id": "1406",
    "title": "Colongra Power Station (en:25606789)",
    "context": "[[Colongra Gas Generation Plant (also known as Colongra Power Station)]] is a $667 MW$ gas-fired power station located in Colongra, New South Wales, Australia and is the largest gas-fired power station in New South Wales.",
    "question": "For which location is the statement true that the installed capacity of the colongra Gas Generation Plant (also known as Colongra Power Station) is 667 MW?",
    "answers": {"text": ["Colongra, New South Wales, Australia"], "answer_start": [116]}
},
...

A separate example with the corresponding formatting, question, and answer is provided for each annotation type. The pre-processed data implies that for a given quantity, first the measured property is asked for, then the measured entity, and finally the qualifiers. Previous answers are highlighted in the context using dollar signs for the quantity, double asterisks for the measured property, and double brackets for the measured entity. For the measured property, the implicit property is taken as the answer if it is not empty. In this case, the answer_start is set to -1. 

Note that for each version of Wiki-Measurements sample IDs are randomly assigned. Therefore, they are not consistent, e.g., between silver small and silver large. The proportions of train, dev, and test sets are unusual because Wiki-Quantities and Wiki-Measurements are intended to be used in conjunction with other non-heuristically generated data.

Emoji format

The emoji format uses colorful emojis to visualize the annotations and facilitate curation. The mapping of annotation types to emojis is as follows:



Basic quantitative statement:



Entity: 🌶️

Property: 🍊

Quantity: 🍏

Value: 🍐

Unit: 🍓

Quantity modifier: ☎️



Qualifier:



Temporal scope: 📆

Start time: ⏱️

End time: ⏰️

Location: 📍

Reference: 🙋

Determination method: 🔭

Criterion used: 📏

Applies to part: 🦵

Scope: 🔎

Some qualifier: 🛁




For example:



Wiki-Quantities (only quantities annotated):



"In a 🍏100-gram🍏 reference amount, almonds supply 🍏579 kilocalories🍏 of food energy."

"Extreme heat waves can raise readings to around and slightly above 🍏38 °C🍏, and arctic blasts can drop lows to 🍏−23 °C to 0 °F🍏."

"This sail added another 🍏0.5 kn🍏."



 Wiki-Measurements (measurement context for a single quantity; qualifiers and quantity modifiers are only sparsely annotated):



"The 🔭French national census🔭 of 📆2018📆 estimated the 🍊population🍊 of 🌶️Metz🌶️ to be 🍐116,581🍐, while the population of Metz metropolitan area was about 368,000."

"🌶️Airbus🌶️ sized the production facilities and supply chain for a 🍊production rate🍊 of 🍐four🍐 🍓A380s per month🍓."

"The 🍊surface temperature🍊 of 🌶️Triton🌶️ was 🔭recorded by Voyager 2🔭 as 🍐-235🍐 🍓°C🍓 (-391 °F)."

"🙋The Babylonians🙋 were able to find that the 🍊value🍊 of 🌶️pi🌶️ was ☎️slightly greater than☎️ 🍐3🍐, by simply 🔭making a big circle and then sticking a piece of rope onto the circumference and the diameter, taking note of their distances, and then dividing the circumference by the diameter🔭."




To facilitate reading and conversion between the different formats, we will soon publish a Python library here.

Evaluation

The evaluation directories contain the manually validated random samples used for evaluation. The evaluation is based on the large versions of the datasets. Manual validation of 100 samples each of Wiki-Quantities and Wiki-Measurements showed that 100% of the Wiki-Quantities samples and 94% (or 84% if strictly scored) of the Wiki-Measurements samples were correct. 

License

In accordance with Wikipedia's and Wikidata's licensing terms, the datasets are released under the CC BY-SA 4.0 license, except for Wikidata facts in ./Wiki-Measurements/raw/additional_data.json, which are released under the CC0 1.0 license (the texts are still CC BY-SA 4.0).

About Us 

We are the Institute of Climate and Energy Systems (ICE) - Jülich Systems Analysis belonging to the Forschungszentrum Jülich. Our interdisciplinary department's research is focusing on energy-related process and systems analyses. Data searches and system simulations are used to determine energy and mass balances, as well as to evaluate performance, emissions and costs of energy systems. The results are used for performing comparative assessment studies between the various systems. Our current priorities include the development of energy strategies, in accordance with the German Federal Government’s greenhouse gas reduction targets, by designing new infrastructures for sustainable and secure energy supply chains and by conducting cost analysis studies for integrating new technologies into future energy market frameworks.

Acknowledgements

The authors would like to thank the German Federal Government, the German State Governments, and the Joint Science Conference (GWK) for their funding and support as part of the NFDI4Ing consortium. Funded by the German Research Foundation (DFG) – project number: 442146713. Furthermore, this work was supported by the Helmholtz Association under the program "Energy System Design".