Skip to main content

ChemDataExtractor Lite

ChemDataExtractor Lite converts scientific HTML, XML, PDF, and plain-text files into a consistent Document object. It keeps document structure, metadata, tables, figures, references, sentence segmentation, and chemistry-aware word segmentation without the tagging and extraction stack from ChemDataExtractor 2.

Installation

pip install -e .

The chemistry-trained sentence model is included in the package, so document loading and segmentation work offline after installation.

Usage

from chemdataextractor import Document

document = Document.from_file("article.xml")

for element in document:
    if hasattr(element, "text"):
        print(type(element).__name__, element.text)

for sentence in document.sentences:
    print(sentence.text)
    print(sentence.raw_tokens)

Document.from_string accepts bytes or Unicode text. Both loading methods accept an optional readers list when explicit format handling is needed.

Supported readers

  • Generic HTML and XML
  • ACS, RSC, CSSP, and Springer HTML
  • Elsevier, NLM/JATS, Springer JATS, and USPTO XML
  • PDF through pdfminer.six
  • Plain text

Publisher-specific readers run before generic fallbacks. Readers preserve titles, headings, paragraphs, citations, footnotes, metadata, figure captions and links, table captions, and raw table cells when the source exposes them.

Document model

The public import namespace remains chemdataextractor. Structural classes are available from chemdataextractor.doc, and readers from chemdataextractor.reader.

Extraction APIs from ChemDataExtractor 2 are intentionally absent: models, parsers, records, POS/NER tagging, chemical mention detection, relation extraction, scraping clients, and model downloads are outside this package.

Development

python -m pip install -e .
python -m pip install pytest build
python -m pytest
python -m build

The project is released under the MIT license. The bundled punkt_chem-1.0.pickle sentence model is the chemistry Punkt model distributed by the ChemDataExtractor project.

Metadata

Release files for chemdataextractor-lite 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chemdataextractor-lite 1.0.0
File Size Uploaded
chemdataextractor_lite-1.0.0.tar.gz 3.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for chemdataextractor-lite 1.0.0
File Interpreter ABI Platform
chemdataextractor_lite-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 MB

Release files / chemdataextractor_lite-1.0.0.tar.gz

Download URL chemdataextractor_lite-1.0.0.tar.gz
Size 3.3 MB
Tags Source
SHA-256 checksum
How to use checksums
bc195c2673f48af1dab061420050d353f03c3a5e2dd8f8e2f0d763ba19c1b1a9
BLAKE2b-256 checksum
How to use checksums
89f103ba073002d4870110950ad68e2b5ffb77ffb83f310c17ed3dbed25d978d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / chemdataextractor_lite-1.0.0-py3-none-any.whl

Download URL chemdataextractor_lite-1.0.0-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a2ff9e84964b8dabc9fcc6edb94179683a4e7de2dfae58415fc4ff5d8ceb6a8b
BLAKE2b-256 checksum
How to use checksums
cb9dafc73242e7dc6d057df59d46a84cb6ff9f576785b9b1564271124570c874
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

1.0.1

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page