# Path: yaya/collection/hmm.py
# class PersonTranMatrix:
#     def __init__(self):
#         self.hmm = HMMMatrix.load(config.PERSON_TR_PATH, NR)


from unittest import TestCase
from yaya.collection.hmm import PersonTranMatrix
# coding=utf-8

__author__ = 'tony'


class TestHMMMatrix(TestCase):
    def test_load(self):
        self.assertIsNotNone(PersonTranMatrix().hmm, u"加载人名识别HMM转换矩阵")
        self.assertNotEqual(PersonTranMatrix().hmm.matrix.__len__(), 0)

# Path: yaya/collection/hmm.py
# class PersonTranMatrix:
#     def __init__(self):
#         self.hmm = HMMMatrix.load(config.PERSON_TR_PATH, NR)


# Path: test/test_hmm.py
from unittest import TestCase
from yaya.collection.hmm import PersonTranMatrix

# coding=utf-8

__author__ = 'tony'


class TestHMMMatrix(TestCase):
    def test_load(self):
        self.assertIsNotNone(PersonTranMatrix().hmm, u"加载人名识别HMM转换矩阵")
        self.assertNotEqual(PersonTranMatrix().hmm.matrix.__len__(), 0)

        self.assertEqual(PersonTranMatrix().hmm.total_freq, 43938702)