How to use the underthesea.classify function in underthesea

To help you get started, we’ve selected a few underthesea examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github undertheseanlp / underthesea / tests / classification / test_bank.py View on Github external
def test_classify_simple_case_2(self):
        text = u"Dkm t chuyển vẫn bị mất phí"
        actual = classify(text, domain='bank')
        expected = ['INTEREST_RATE', 'MONEY_TRANSFER']
        self.assertEqual(actual, expected)
github undertheseanlp / underthesea / tests / classification / test_vntc.py View on Github external
def test_classify_simple_case(self):
        text = u"HLV ngoại đòi gần tỷ mỗi tháng dẫn dắt tuyển Việt Nam"
        actual = classify(text)[0]
        expected = "the_thao"
        self.assertEqual(actual, expected)
github undertheseanlp / underthesea / tests / classification / test_vntc.py View on Github external
def test_classify_null_cases(self):
        sentence = u""
        actual = classify(sentence)
        expected = None
        self.assertEqual(actual, expected)
github undertheseanlp / underthesea / tests / classification / test_bank.py View on Github external
def test_classify_simple_case_3(self):
        text = u"Lãi suất từ BIDV rất ưu đãi"
        actual = classify(text, domain='bank')
        expected = ['INTEREST_RATE']
        self.assertEqual(actual, expected)
github undertheseanlp / underthesea / tests / classification / test_bank.py View on Github external
def test_classify_simple_case(self):
        text = u"Mở tài khoản ATM thì có đc quà ko ad"
        actual = classify(text, domain='bank')
        expected = ["CUSTOMER_SUPPORT"]
        self.assertEqual(actual, expected)