Skip to content

Commit

Permalink
fix #93 multiple decimals break extract_number
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanceNCounter committed Mar 24, 2020
1 parent 11fae0a commit dab967e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lingua_franca/lang/parse_en.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def _extract_decimal_with_text_en(tokens, short_scale, ordinals, places=None):
for c in _DECIMAL_MARKER:
partitions = partition_list(tokens, lambda t: t.word == c)

if len(partitions) == 3:
if len(partitions) >= 3:
numbers1 = \
_extract_numbers_with_text_en(partitions[0], short_scale,
ordinals, fractional_numbers=False,
Expand All @@ -301,7 +301,6 @@ def _extract_decimal_with_text_en(tokens, short_scale, ordinals, places=None):
if not numbers1 or not numbers2:
return None, None

token_idx = numbers2[0].tokens[0].index
idx = 1
stop = False
while idx < len(numbers2) and not stop:
Expand Down

0 comments on commit dab967e

Please sign in to comment.