nielstron / quantulum3

Library for unit extraction - fork of quantulum for python3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cubic centimeters parses to deciliter

airarrazaval opened this issue · comments

Describe the bug
Cubic centimeter using cm3 or cm^3 is parsed to deciliter.

To Reproduce

from quantulum3.parser import parse

values = ['1 cc', '2 ml', '3 cm3', '4 cm^3']

for value in values:
  print(parse(value)[0].to_spoken())

Output:

one cubic centimetre
two cubic centimetres
three decilitres
four decilitres

Expected behavior
cm3 or cm^3 should be parsed to cc

Additional information:

  • Python Version: 3.8.10
  • Classifier activated/ sklearn installed: no
  • OS: Ubuntu
  • Version: 20.04 LTS

Thanks for posting this issue! I found the root of this issue and a number of related problems in the unit database and removed them in 48818bd . As soon as this passes, I will publish it in a new version of quantulum3

fixed in release 0.7.9