quantulum3 is an actively maintained Python library (v0.10.0) designed for the robust extraction of quantities, measurements, and their associated units from unstructured text. It leverages machine learning, specifically k-nearest neighbors on GloVe vector representations, to disambiguate between similar-looking units, ensuring accurate information retrieval. The project is a Python 3 compatible fork of earlier versions and continues to evolve with ongoing development and community contributions.
pip install quantulum3Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to parse a string for quantities and access their attributes. It also shows the inline parsing utility.
Always use `pip install quantulum3` and `from quantulum3 import parser` for Python 3 projects.
Install with `pip install quantulum3[classifier]` to enable the full classifier functionality.
For extracting properties of a specific unit string, prepend a numerical value like '1 ' to the string, e.g., `parser.parse('1 meter')`.Ensure quantulum3 is updated to the latest version. If persistent, check package integrity and Python environment paths.
Install `quantulum3` using `pip install quantulum3` and import with `from quantulum3 import parser`.
If you need to get unit information for a standalone word, consider prepending a number, e.g., `parser.parse('1 meter')`, then extract the unit from the resulting Quantity object.Upgrade to the latest `quantulum3` version (`pip install --upgrade quantulum3`). If the problem persists, try reinstalling in a clean virtual environment.