Skip to content

Commit 146b766

Browse files
jmt-ghstrangetom
andauthored
Add "Unit" unit (#34)
* Add new unit "unit" This commit looks to add a new unit to be supported. HelloFresh in particular often uses "unit" when referencing an atomic item. For example "1 unit apple" to mean "1 apple". * Add unit to MISINTERPRETED_UNITS This was being interpreted by pint as a "micronit" or a "micro newton inch". But instead we want it to represent itself -- "unit". --------- Co-authored-by: tom <tpstrange@gmail.com>
1 parent 28cc32b commit 146b766

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

ingredient_parser/en/_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
"tsps": "tsp",
112112
"tubes": "tube",
113113
"twists": "twist",
114+
"units": "unit",
114115
"wedges": "wedge",
115116
"wheels": "wheel",
116117
}

ingredient_parser/en/_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
"shakes",
4949
"tin", # tera-inch
5050
"tins",
51+
"unit", # micronit (micro netwon inch)
52+
"units"
5153
"fat", # femto-technical-atmosphere
5254
]
5355

0 commit comments

Comments
 (0)