Expand description
Units + numeric parsing — turns raw cell values and tagged quantity spans into comparable numbers
so IKL’s (num <field> <op> <value>) range predicate can filter on magnitude (e.g. “braking
distance ≤ 70 m”, “range ≥ 800”, “price < 30000”). Two entry points:
• parse_number — a bare numeric (CSV cell): strips thousands separators, currency, %.
• parse_quantity — a value+unit span (from the QTY tagger): canonicalises to an SI dimension so
“100 km/h” and “27.8 m/s” compare, tagged under a dimensional field (qty-length, qty-mass…).
Functions§
- cmp_op
- Evaluate a numeric comparison for a stored value:
value op target. - parse_
number - Parse a bare number from a cell, tolerating thousands separators, a leading currency symbol, and a
trailing percent sign.
Noneif it isn’t numeric. - parse_
quantity - Parse a
<number><unit>quantity → (dimensional field, SI value). Recognises the common engineering dimensions; returnsNonefor anything it can’t canonicalise.