Ctrl K

quinex

quinex automates the large-scale extraction of quantitative information from text across many domains using lightweight and open language models

6
contributors
9 commitsLast commit ≈ 1 month ago2 stars0 forks

Description

Quinex

quinex (quantitative information extraction) is a Python library for extracting and analyzing quantitative information from text. It is designed to extract quantities, entities, properties and other measurement context from text. Quinex is domain-agnostic and can power a wide range of applications, such as screening of scientific literature or quantitative search.

Quinex performs quantity span identification and measurement context extraction. Quantity span identification is the task of identifying quantities in text. This task closely relates to named entity recognition and thus can be framed as sequence labeling task. Measurement context extraction is the task of identifying the measured entity, property, and other measurement context for a given quantity. Additionally, quantities are normalized to a standardized form and the quantitative statements are classified into different types (e.g., specification, goal, observation, etc.).

Features

  • Extract all quantities in a given text (optionally also imprecise quantities, e.g., “several turbines”)
  • Normalize quantities to a standardized form
  • Extract measurement contexts for each quantity
    • Extract the entity and property related to a quantity
    • Extract implicit properties (e.g., rated power in “the 5 MW power plant”)
    • Extract additional information (i.e., the temporal scope, spatial scope, references, determination method, and other qualifiers)
  • Experimental: Classify the type of quantitative statement (e.g., specification, goal, observation, etc.)

Furthermore, Quinex includes an experimental web service that shows extracted information on a dashboard as well as directly in the source text. From there, the information can be curated. Visualizations include world maps, timelines, and citation networks for tracing the original source of a quantitative statement.

Related resources

Related publications

Quinex is described in detail in the following article: "Quinex: Quantitative Information Extraction from Text using Open and Lightweight LLMs" (published soon). Furthermore, the heuristic creation of training data is described in "Wiki-Quantities and Wiki-Measurements: Datasets of quantities and their measurement context from Wikipedia" (2025). For a review of the field of quantitative information extraction pre-ChatGPT, see "Measurement Extraction with Natural Language Processing: A Review" (2022).

Why use quinex?

Like larger, general-purpose LLMs, Quinex is built on transformer models. However, it is specifically tailored to the task of extracting quantitative information from text and thus can be much more efficient with orders of magnitude less model parameters. Compared to similar specialized tools, quinex is more accurate, provides more contextual information, is domain-agnostic, and considers implicit properties. Furthermore, although quinex does occasionally misinterpret the measurement context, it cannot hallucinate quantities, as they are extracted directly from the text. As quinex' predictions are grounded in the text, they are transparent and can be easily verified. Lastly, quinex is open-source and can be self-hosted.

Getting started

First, familiarize yourself with the strengths and limitations of quinex. You may also want to read the FAQ section.

Quinex can be used as a Python library, via API, or in a web service to for analyzing scientific literature. See the usage guide for detailed instructions.

To use quinex as a Python library, create and activate a virtual environment. Then, install the package via pip:

pip install quinex

Finally, download the spaCy pipeline and install dependencies that are not on PyPI:

python3 -m spacy download en_core_web_md
pip install git+https://github.com/FZJ-IEK3-VSA/llm-chunker.git

Now, you can use quinex as follows:

>>> from quinex import Quinex

>>> quinex = Quinex()
>>> text = "Reykjanesvirkjun is a geothermal power station located in Iceland with a power output of 130 MW."

>>> qclaims = quinex(text)
[
    {
        'claim': {
            'entity': {
                'is_implicit': False,
                'start': 0,
                'end': 16,
                'text': 'Reykjanesvirkjun'
            }, 
            'property': {
                'is_implicit': False,
                'start': 73,
                'end': 85,
                'text': 'power output'
            }, 
            'quantity': {
                'is_implicit': False,
                'start': 89,
                'end': 95,
                'text': '130 MW',
                'normalized': { [...] 'numeric_value': 130 [...] 'unit': [...] 'text': 'MW', 'exponent': 1, 'uri':'http://qudt.org/vocab/unit/MegaW' [...] }
        'qualifiers': {
            'temporal_scope': None
            'spatial_scope': {
                'text': 'Iceland',            
                'start': 58,
                'end': 65,
                'is_implicit': False
            }, 
            'reference': None
            'method': None
            'qualifier': None
        }, 
        'statement_classification': {
            'type': 'observation',
            'rational': 'arbitrary',
            'system': 'real_world'
        }
    }
]

For more examples, see the usage guide and the examples.

Limitations

[!IMPORTANT] Quinex makes mistakes. Thus, the extracted information should be verified by humans.

  • Quinex is trained on scientific articles and Wikipedia articles and may not work well on text genres that differ significantly from the training data, such as first-person narration or song lyrics.
  • Quinex will not work well on non-English texts. The models and tokenizers are trained on English texts.
  • If you need to extract quantitative information from tables or figures, quinex is not yet capable of doing so.
  • Although quinex considers implicit properties (e.g., rated power in “the 5 MW power plant”), it cannot extract implicit quantities (e.g., the number of elephants and puffins in the zoo in “The zoo is very tiny hosting only an elephant and a puffin.” is one each).
  • Quinex currently does not normalize entities, properties, and other contextual information to a standardized form, thus "PV" and "photovoltaic" are treated as different entities and must be normalized in post-processing.
  • The models for classifying the type of a quantitative statement are not yet trained on a large enough dataset and thus are not very accurate.
  • The normalization of descriptions of locations to geographic coordinates is currently based on a simple and not very accurate approach.
  • Parsing PDFs into machine-readable representations leads to errors. For example, mathematical formatting is often lost (e.g., 10³ to 103). This can lead to errors when normalizing the quantities.
  • Overlapping quantities are currently not supported. For example, "7 (1-bit) wires per channel" would be recognized as a quantity, but not "1-bit".
  • The training data does not cover a diverse set of imprecise quantifications. As a result, "a few...", "several..." are identified as quantities, but more exotic ones, such as "a truckload...", may not.
  • Due to limitations of the tokenizer, the responses of the model for the extraction of the measurement context miss special symbols such as Greek letters (e.g., λ , ε, or ∆). We will address this limitation in future releases. Quantity span identification is not affected by this.

FAQ

How does quinex work?

Quinex uses two main components: a quantity span identification model and a measurement context extraction model. Both models are based on the transformer architecture and are fine-tuned on a large dataset tailored for their respective tasks. Quantity span identification is the task of identifying quantity spans in text. This task closely relates to named entity recognition and thus is framed as a sequence labeling task. Measurement context extraction is the task of identifying the measured entity, property and other measurement context for a given quantity. We frame this task as multi-turn generative question answering. Quantities are normalized using an efficient rule-based parser.

How accurate is quinex?

Quinex achieves state-of-the-art F1 scores of 96.3% for identifying quantities, 82.5% for extracting the measured entities, and 87.3% for extracting the measured properties when evaluated on the test set using the larger model variants (quinex-quantity-v0-124M + quinex-context-v0-783M). Considering alternative correct answers, the overall accuracy on the test set for quantity span identification and measurement context ectraction is 98.1% and 90.1%, respectively. The macro-averaged F1 over all qualifier classes is 90.5%. However, note that abstaining is often the correct answer for qualifiers. Evaluating quantity span identification and measurement extraction end-to-end on four scientific publications from different domains, Quinex achieves entity-level accuracies of 92.0%, 81.8%, and 79.3% in identifying quantities, measured entities, and properties, respectively. Primarily, quantities with "single" as the value (e.g., "single-gene") and imprecise quantities (e.g., "multi-view") were missed. For correctly identified quantities, measured entities and properties are identified with 86.8% and 84.3% accuracy, respectively. Qualifiers are identified with 77% accuracy for temporal scopes, 76% for spatial scopes, 80% for references, 83% for determination methods, and 56% for other not-categorized qualifiers. All qualifiers are correctly extracted together for 34% of quantitative statements. The entity, property, and quantity are all correctly extracted for 70% of quantitative statements, or 75% for statements with correctly identified quantities. Please refer to the publication for more information (published soon).

For which domains can I use quinex?

Quinex is domain-agnostic and can be used for many domains. However, as the training data is currently biased towards scientific texts and Wikipedia articles, other text genres (e.g., news articles, social media posts, song lyrics, etc.) may not be processed as accurately. The training data is also biased towards hydrogen technologies, Covid-19 R0 values, supercritical temperatures of superconductors, and polymer synthesis. We aim to continuously expand the training data based on user feedback and contributions. If you are interested in contributing training data, please reach out to us.

How long does it take to analyze 1000 scientific articles?

The time it takes to analyze 1000 scientific articles depends mainly on the number of quantities in them and the compute resources used. On average, quinex requires 0.4 seconds per quantitative statement per GPU. Typically, a paper contains between 90 and 210 quantitative statements. Thus, quinex can process 1000 scientific articles in roughly 10-23 hours on a single GPU or 1-3 h on 8 GPUs. We have not yet made major efforts to optimize inference speed, so there is likely a lot of untapped potential.

How can I contribute to quinex?

You can contribute to quinex by reporting issues, suggesting improvements, or contributing training data. Note that we can only add the training data if you have the rights to modify and share the source texts.

If you have further questions or feedback, please reach out to us.

Citation

If you use quinex in your research, please cite the following paper:

@article{quinex2025,
    title = {{Quinex: Quantitative Information Extraction from Text using Open and Lightweight LLMs}},	
    author = {Göpfert, Jan and Kuckertz, Patrick and Müller, Gian and Lütz, Luna and Körner, Celine and Khuat, Hang and Stolten, Detlef and Weinand, Jann M.},
    month = okt,
    year = {2025},
}

License

For the most part, Quinex is licensed under the MIT License. However, there are some exceptions. Please see the LICENSE file for details.

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".

Participating organisations

Forschungszentrum Jülich

Reference papers

Contributors

JG
Jan Göpfert
PK
Patrick Kuckertz
CK
Celine Körner
JW
Jann Michael Weinand
NP
Noah Pflugradt
JL
Jochen Linssen

Helmholtz Program-oriented Funding IV