b7ff45e0e63da05d2a118f8e050e9b20b9eb0f09,pythainlp/number/thainum.py,,bahttext,#Any#,89

Before Change


    elif amount_number == 0:
        ret = "ศูนย์บาทถ้วน"
    else:
        amount_number = number_format(amount_number, 2).replace(" ", "")
        pt = amount_number.find(".")
        number, fraction = "", ""
        amount_number1 = amount_number.split(".")

        if not pt:
            number = amount_number
        else:
            amount_number = amount_number.split(".")
            number = amount_number[0]
            fraction = int(amount_number1[1])

        number = ast.literal_eval(number.replace(",", ""))

        baht = num_to_thaiword(number)
        if baht != "":
            ret = "".join([ret, baht, "บาท"])

After Change


    elif number == 0:
        ret = "ศูนย์บาทถ้วน"
    else:
        num_int, num_dec = "{:.2f}".format(number).split(".")
        num_int = int(num_int)
        num_dec = int(num_dec)

        baht = num_to_thaiword(num_int)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: PyThaiNLP/pythainlp
Commit Name: b7ff45e0e63da05d2a118f8e050e9b20b9eb0f09
Time: 2018-11-04
Author: arthit@gmail.com
File Name: pythainlp/number/thainum.py
Class Name:
Method Name: bahttext


Project Name: matplotlib/matplotlib
Commit Name: b8cd2d592460cbe8fd6977702623cc739305f7de
Time: 2018-09-06
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/artist.py
Class Name: ArtistInspector
Method Name: get_aliases


Project Name: matplotlib/matplotlib
Commit Name: 56fb1c6e2be3e8238c72efe558c34aacfcd39b52
Time: 2018-09-10
Author: jklymak@gmail.com
File Name: lib/matplotlib/artist.py
Class Name: ArtistInspector
Method Name: get_aliases


Project Name: numenta/NAB
Commit Name: 01014b01722a0b95620c418e9b81582701ce85b0
Time: 2015-09-24
Author: alavin@numenta.com
File Name: tests/integration/corpuslabel_test.py
Class Name: CorpusLabelTest
Method Name: testBucketMerge