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 chemdataextractor-lite
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.
RSC HTML and Elsevier XML tables also retain their pre-cleaning markup fragment as Table.raw_markup. The value is included as raw_markup when the table or document is serialized. Tables loaded by other readers currently set this attribute to None.
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chemdataextractor_lite-1.0.1.tar.gz | 3.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chemdataextractor_lite-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 MB
Release files / chemdataextractor_lite-1.0.1.tar.gz
| Download URL | chemdataextractor_lite-1.0.1.tar.gz |
|---|---|
| Size | 3.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd1d58045e32deb92eca83ee5417bee0893f6078fa44391c5b2c39d8cd869cf6
|
|
BLAKE2b-256 checksum How to use checksums |
b99276afaa9a1bcdcdaedeb0fd084e8c27ac38aa7f13c1223725867818ea5d06
|
| 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.1-py3-none-any.whl
| Download URL | chemdataextractor_lite-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff019bc2c5a0a2074d0b988d9e72deca6e8bd5031719f9904bc3cb0beb85ef46
|
|
BLAKE2b-256 checksum How to use checksums |
a8c857a22e96bbf4cb629018a75b590bad57cdc3e177aec56e02ef7d99b61444
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|