--- id: quantulum3 version: "0.10.0" license: MIT license_treatment: permissive maintenance: active --- # quantulum3 — Extract quantities from unstructured text. License: permissive · Maintenance: active · Downloads: 226.9K/mo ## What it is and what it does Quantulum3 is a Python library that identifies and extracts numeric quantities and their units from plain text. It parses both standard units (litre, kilogram, terawatt) and spelled-out numbers, ranges, and uncertainties, then reconciles them against Wikipedia to determine their entity type (volume, mass, energy, etc.). When multiple units could match the same text, it uses a classifier trained on GloVe word vectors and Wikipedia context to disambiguate—for example, distinguishing currency from weight based on surrounding words. The library returns Quantity objects containing the parsed value, unit name, entity classification, and span positions in the original text. It also supports inline parsing for debugging, export to JSON or dictionaries, and conversion to spoken form. Two lightweight runtime dependencies (inflect and num2words) handle number inflection and text-to-speech conversion. Optional classifier training is available for custom models. Use it for: - Parse scientific or technical documents to identify measurements and their units for indexing or validation. - Disambiguate currency amounts from weight or distance in mixed-domain text. - Build a dimensionless number extractor for cases where only numeric values matter. - Convert measurement text to structured data for downstream unit conversion or comparison. - Extract and classify quantities from product descriptions or technical specifications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extracts quantities, measurements, and their units from unstructured text, disambiguating between similar units using vector similarity and Wikipedia context. Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a specific NLP problem (quantity extraction with disambiguation) that is difficult to implement from scratch. MIT licensing removes legal friction. Use it when you need to reliably extract and classify quantities from unstructured text; skip it if you only need simple regex-based number extraction. ## Install pip install quantulum3 uv add quantulum3 poetry add quantulum3 ## Installing quantulum3 Before you install: Low friction installation with only two runtime dependencies (inflect and num2words). Active maintenance with recent releases; last commit 2026-05-19. Supports Python 3.9 through 3.13. License in practice: MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute the package freely provided you include the license notice. Quickstart: pip install quantulum3 from quantulum3 import parser quants = parser.parse('I want 2 liters of wine') print(quants[0].value, quants[0].unit.name) Requires Python 3.9 or later. Optional classifier features require additional dependencies installable via `pip install quantulum3[classifier]`. Verify before relying: - Whether the GloVe vector representation and Wikipedia disambiguation data are bundled or downloaded on first use, and what network/storage requirements that entails. - Performance characteristics on large documents or real-time parsing scenarios. - How well the parser handles domain-specific or non-English quantities. - Typical accuracy and precision of the disambiguation classifier on real-world text. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 226.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags extract quantities from text, unit extraction nlp, measurement parsing, quantity recognition, information extraction units, number and unit parsing, text mining quantities, nlp, information-extraction, unit-parsing [View on SkillFed](https://skillfed.io/packages/quantulum3) · [View on PyPI](https://pypi.org/project/quantulum3/)