pythainlp.number

The pythainlp.number contains functions for processing thai numbers and thai words that refers to numbers.

pythainlp.number.thai_num_to_num(text)[source]
Parameters

text (str) – Thai number characters such as ‘๑’, ‘๒’, ‘๓’

Returns

universal numbers such as ‘1’, ‘2’, ‘3’

pythainlp.number.thai_num_to_text(text)[source]
Parameters

text (str) – Thai number characters such as ‘๑’, ‘๒’, ‘๓’

Returns

Thai numbers, spelled out in Thai

pythainlp.number.num_to_thai_num(text)[source]
Parameters

text – universal numbers such as ‘1’, ‘2’, ‘3’

Returns

Thai number characters such as ‘๑’, ‘๒’, ‘๓’

pythainlp.number.num_to_text(text)[source]
Parameters

text – universal numbers such as ‘1’, ‘2’, ‘3’

Returns

Thai numbers, spelled out in Thai

pythainlp.number.text_to_num(text)[source]
Parameters

text – Thai numbers, spelled out in Thai

Returns

universal numbers such as ‘1’, ‘2’, ‘3’

pythainlp.number.numtowords(amount_number)[source]