pythainlp.collation

The pythainlp.collation contains a function that sorts Thai text alphabetically

pythainlp.collation.collation(data)[source]
Parameters

data (list) – a list of thai text

Returns

a list of thai text, sorted alphabetically

Example::
>>> from pythainlp.collation import *
>>> collation(['ไก่', 'เป็ด', 'หมู', 'วัว'])
['ไก่', 'เป็ด', 'วัว', 'หมู']