Registry / search / recognizers-text-number-with-unit

recognizers-text-number-with-unit

JSON →
library1.0.2a2pypypiunverified

Part of the Microsoft Recognizers-Text suite, this library extracts numbers with units (e.g., '5kg', '10 meters', '3.5 hours') from text. Version 1.0.2a2 is an alpha pre-release. Release cadence is irregular; the package has not been updated since 2021.

pip install recognizers-text-number-with-unit
INSTALL
IMPORT
SIG · RECOGNIZERS-TEXT-N
R
recognizers-text-number-with-unit
searchpythonv1.0.2a2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NumberWithUnitRecognizer
from recognizers_number_with_unit import NumberWithUnitRecognizer
from recognizers_number_with_unit import NumberWithUnitRecognizer

Quickstart to recognize numbers with units in a text string.

from recognizers_number_with_unit import NumberWithUnitRecognizer recognizer = NumberWithUnitRecognizer() text = "I need 5kg of flour and 2 liters of milk." results = recognizer.recognize_number_with_unit(text, 'en-us') for r in results: print(f"Text: {r.text}, Value: {r.resolution['value']}, Unit: {r.resolution['unit']}")
Debug
Known issues
gotchaThe package is an alpha release (1.0.2a2). API may break without notice; avoid in production without pinning.
fix
Pin to exact version and test thoroughly before upgrading.
affects: <=1.0.2a2
deprecatedThis package is part of a larger suite that appears to be in maintenance mode. The last update was in 2021. Consider using alternatives like duckling or dateparser for similar functionality.
fix
Evaluate long-term viability and consider migration if needed.
affects: all
Upgrade
Version history
1.0.2a2latest on PyPI · released Nov 12, 2019
Audit
Dependencies
recognizers-textrequiredCore recognizers package required for base types and culture support.
Agent activity
28 hits · last 30 days
node
24
Resources
recognizers-text-number-with-unit — pip install recognizers-text-number-with-unit · libregistry