diff --git a/g2p_en/expand.py b/g2p_en/expand.py index d6a9592..89c4bec 100644 --- a/g2p_en/expand.py +++ b/g2p_en/expand.py @@ -34,7 +34,7 @@ def _expand_dollars(m): parts = match.split('.') if len(parts) > 2: return match + ' dollars' # Unexpected format - dollars = int(parts[0]) if parts[0] else 0 + dollars = int(re.sub(',', '', parts[0])) if parts[0] else 0 cents = int(parts[1]) if len(parts) > 1 and parts[1] else 0 if dollars and cents: dollar_unit = 'dollar' if dollars == 1 else 'dollars'