speech_asr
2023-03-10 9e2a04d0e0823c0fe2f3dc9fafa68d2045b773d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- coding: utf-8 -*-
 
from __future__ import print_function, unicode_literals
 
from .lang_ES import Num2Word_ES
 
 
class Num2Word_ES_CO(Num2Word_ES):
 
    def to_currency(self, val, longval=True, old=False):
        result = self.to_splitnum(val, hightxt="peso/s", lowtxt="centavo/s",
                                  divisor=1, jointxt="y", longval=longval)
        # Handle exception, in spanish is "un euro" and not "uno euro"
        return result.replace("uno", "un")