[fix] don't convert number to int/float in numeric_phrase (chops leading zeros)
This commit is contained in:
@@ -253,11 +253,11 @@ class NumberedComponent(object):
|
|||||||
is_none = False
|
is_none = False
|
||||||
if num is not None:
|
if num is not None:
|
||||||
try:
|
try:
|
||||||
num = int(num)
|
num_int = int(num)
|
||||||
is_integer = True
|
is_integer = True
|
||||||
except ValueError:
|
except ValueError:
|
||||||
try:
|
try:
|
||||||
num = float(num)
|
num_float = float(num)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
tokens = tokenize(safe_decode(num))
|
tokens = tokenize(safe_decode(num))
|
||||||
has_numeric = False
|
has_numeric = False
|
||||||
|
|||||||
Reference in New Issue
Block a user