Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test_tag to __init__ #971

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"tests.test_morpheme",
"tests.test_soundex",
"tests.test_spell",
"tests.test_tag",
"tests.test_tokenize",
"tests.test_tools",
"tests.test_transliterate",
Expand Down
6 changes: 3 additions & 3 deletions tests/testx_tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# Tests for functions that need external imports
class TokenizeTestCaseX(unittest.TestCase):
def testx_subword_tokenize(self):
def test_subword_tokenize(self):
self.assertEqual(subword_tokenize(None, engine="ssg"), [])
self.assertEqual(subword_tokenize(None, engine="han_solo"), [])
self.assertEqual(
Expand Down Expand Up @@ -88,7 +88,7 @@ def testx_subword_tokenize(self):
subword_tokenize("โควิด19", engine="wangchanberta"), list
)

def testx_sent_tokenize(self):
def test_sent_tokenize(self):
# Use default engine (crfcut)
self.assertEqual(sent_tokenize(None), [])
self.assertEqual(sent_tokenize(""), [])
Expand Down Expand Up @@ -188,7 +188,7 @@ def testx_sent_tokenize(self):
# ),
# )

def testx_word_tokenize(self):
def test_word_tokenize(self):
self.assertIsNotNone(word_tokenize(TEXT_1, engine="nlpo3"))
self.assertIsNotNone(word_tokenize(TEXT_1, engine="attacut"))
self.assertIsNotNone(word_tokenize(TEXT_1, engine="deepcut"))
Expand Down
4 changes: 2 additions & 2 deletions tests/testx_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class UtilTestCaseX(unittest.TestCase):
def testx_rhyme(self):
def test_rhyme(self):
self.assertIsInstance(rhyme("แมว"), list)
self.assertTrue(len(rhyme("แมว")) > 2)

Expand All @@ -25,7 +25,7 @@ def test_spell_word(self):
spell_word("คนดี"), ["คอ", "นอ", "คน", "ดอ", "อี", "ดี", "คนดี"]
)

def testx_thai_word_tone_detector(self):
def test_thai_word_tone_detector(self):
self.assertIsNotNone(thai_word_tone_detector("คนดี"))
self.assertEqual(
thai_word_tone_detector("ราคา"), [("รา", "m"), ("คา", "m")]
Expand Down