Commit a546d8bf by 陈森彬

增加标准单位

parent b70bf1ec
Showing with 30 additions and 15 deletions
......@@ -44,28 +44,43 @@ unit_map = {
'Mf': 1000000000,
'mf': 1000000000,
'F': 1000000000000},
'pH': {'pH': 1,
'nH': 1000,
'µH': 1000000,
'UH': 1000000,
'μh': 1000000,
'uh': 1000000,
'Uh': 1000000,
'mH': 1000000000,
'Mh': 1000000000,
'MH': 1000000000,
'mh': 1000000000,
'H': 1000000000000},
'pH': {
'pH': 1,
'Ph': 1,
'PH': 1,
'ph': 1,
'nH': 1000,
'µH': 1000000,
'UH': 1000000,
'μh': 1000000,
'uh': 1000000,
'Uh': 1000000,
'mH': 1000000000,
'Mh': 1000000000,
'MH': 1000000000,
'mh': 1000000000,
'H': 1000000000000},
'mA': {'mA': 1,
'A': 1000},
'A': 1000,
'a': 1000,
},
'V': {'V': 1,
'v': 1,
'kV': 1000,
'Kv': 1000,
'kv': 1000,
'KV': 1000},
'W': {'W': 1,
'kW': 1000, },
'w': 1,
'kW': 1000,
'kw': 1000,
'KW': 1000,
'Kw': 1000,
},
'%': {'%': 0.01, },
}
......@@ -83,4 +98,4 @@ cast_map = {
'瓦': 'W',
}
unit_regex = "μΩ|uΩ|mΩ|Ω|kΩ|KΩ|MΩ|GΩ|TΩ|pF|PF|Pf|pf|nF|NF|Nf|nf|µF|uF|UF|Uf|uf|mF|MF|Mf|mf|F|pH|nH|µH|UH|μh|uh|Uh|mH|Mh|MH|mh|H|mA|A|V|kV|KV|W|kW|%|毫欧|欧姆|欧|千欧|兆欧|伏特|伏|千伏|瓦特|瓦"
unit_regex = "μΩ|uΩ|mΩ|Ω|kΩ|KΩ|MΩ|GΩ|TΩ|pF|PF|Pf|pf|nF|NF|Nf|nf|µF|uF|UF|Uf|uf|mF|MF|Mf|mf|F|pH|Ph|PH|ph|nH|µH|UH|μh|uh|Uh|mH|Mh|MH|mh|H|mA|A|a|V|v|kV|Kv|kv|KV|W|w|kW|kw|KW|Kw|%|毫欧|欧姆|欧|千欧|兆欧|伏特|伏|千伏|瓦特|瓦"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment