File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -589,3 +589,6 @@ def test_sefr_cut(self):
589589 self .assertIsNotNone (
590590 sefr_cut .segment ("ฉันรักภาษาไทยเพราะฉันเป็นคนไทย" ),
591591 )
592+ self .assertIsNotNone (
593+ sefr_cut .segment ("ฉันรักภาษาไทยเพราะฉันเป็นคนไทย" , engine = "tnhc" ),
594+ )
Original file line number Diff line number Diff line change 33import unittest
44
55from pythainlp .wangchanberta import ThaiNameTagger , pos_tag , segment
6+ from pythainlp .wangchanberta .postag import PosTagTransformers
67
78
89class TestWangchanberta (unittest .TestCase ):
@@ -88,3 +89,12 @@ def test_pos_tag_wangchanberta(self):
8889 self .assertIsNotNone (
8990 pos_tag ("ทดสอบระบบ" , grouped_word = False )
9091 )
92+ _pos = PosTagTransformers ()
93+ self .assertIsNotNone (
94+ _pos .tag ("ทดสอบระบบ" , grouped_word = False )
95+ )
96+ self .assertIsNotNone (
97+ _pos .tag ("ทดสอบระบบ" , grouped_word = True )
98+ )
99+ with self .assertRaises (NotImplementedError ):
100+ pos_tag ("I คิด therefore I am ผ็ฎ์" , grouped_word = True , corpus = "cat" )
You can’t perform that action at this time.
0 commit comments