Beispiel #1
0
# -*- coding: utf-8 -*-
from pythainlp.collation import collation
print(collation(['ไก่', 'ไข่', 'ก', 'ฮา']))  # ['ก', 'ไก่', 'ไข่', 'ฮา']
Beispiel #2
0
# -*- coding: utf-8 -*-

from pythainlp.collation import collation

print(collation(["ไก่", "ไข่", "ก", "ฮา"]))  # ['ก', 'ไก่', 'ไข่', 'ฮา']
Beispiel #3
0
	def test_collation(self):
    		self.assertEqual(collation(['ไก่','กก']),[u'กก', u'ไก่'])
Beispiel #4
0
 def test_collation(self):
     self.assertEqual(collation(['ไก่', 'กก']), [u'กก', u'ไก่'])
     self.assertEqual(collation(['ไก่', 'เป็ด', 'หมู', 'วัว']),
                      [u'ไก่', u'เป็ด', u'วัว', u'หมู'])
Beispiel #5
0
# -*- coding: utf-8 -*-
from pythainlp.collation import collation
print(collation(['ไก่','ไข่','ก','ฮา'])) # ['ก', 'ไก่', 'ไข่', 'ฮา']
Beispiel #6
0
	def test_collation(self):
		self.assertEqual(collation(['ไก่','กก']),[u'กก', u'ไก่'])
		self.assertEqual(collation(['ไก่', 'เป็ด', 'หมู', 'วัว']),[u'ไก่', u'เป็ด', u'วัว', u'หมู'])