CambridgeMolecularEngineering / chemdataextractor2

ChemDataExtractor Version 2.0
Other
130 stars 31 forks source link

Added unicode expression for greek letter mu to regex in magnitude dict #3

Closed OBrink closed 2 years ago

OBrink commented 2 years ago

A tiny change:

In chemdataextractor/parse/quantity.py, line 31, the Unicode expression '\u03bc' for the greek character mu was added in the magnitudes_dict to make sure that the character is parsed.

Without this change, 'µ' is not automatically recognised as a magnitude. In my case, an expression with the unit "µmol" was not parsed. I am not sure if this is a system-specific issue (tested on Windows 10). Adding the Unicode expression fixed it.