def test_system_dictionary_ipadic(self):
    sys_dic = SystemDictionary(all_fstdata(), entries(), connections, chardef.DATA, unknowns.DATA)
    self.assertEqual(7, len(sys_dic.lookup('形態素'.encode('utf-8'))))
    self.assertEqual(1, sys_dic.get_trans_cost(0, 1))
    self.assertEqual({'HIRAGANA': []}, sys_dic.get_char_categories('は'))
    self.assertEqual({'KATAKANA': []}, sys_dic.get_char_categories('ハ'))
    self.assertEqual({'KATAKANA': []}, sys_dic.get_char_categories('ﾊ'))
    self.assertEqual({'KANJI': []}, sys_dic.get_char_categories('葉'))
    self.assertEqual({'ALPHA': []}, sys_dic.get_char_categories('C'))
    self.assertEqual({'ALPHA': []}, sys_dic.get_char_categories('Ｃ'))
    self.assertEqual({'SYMBOL': []}, sys_dic.get_char_categories('#'))
    self.assertEqual({'SYMBOL': []}, sys_dic.get_char_categories('＃'))
    self.assertEqual({'NUMERIC': []}, sys_dic.get_char_categories('5'))
    self.assertEqual({'NUMERIC': []}, sys_dic.get_char_categories('５'))
    self.assertEqual({'KANJI': [], 'KANJINUMERIC': ['KANJI']}, sys_dic.get_char_categories('五'))
    self.assertEqual({'GREEK': []}, sys_dic.get_char_categories('Γ'))
    self.assertEqual({'CYRILLIC': []}, sys_dic.get_char_categories('Б'))
    self.assertEqual({'DEFAULT': []}, sys_dic.get_char_categories('𠮷'))
    self.assertEqual({'DEFAULT': []}, sys_dic.get_char_categories('한'))
    self.assertTrue(sys_dic.unknown_invoked_always('ALPHA'))
    self.assertFalse(sys_dic.unknown_invoked_always('KANJI'))
    self.assertTrue(sys_dic.unknown_grouping('NUMERIC'))
    self.assertFalse(sys_dic.unknown_grouping('KANJI'))
    self.assertEqual(2, sys_dic.unknown_length('HIRAGANA'))
def test_system_dictionary_ipadic(self):
    sys_dic = SystemDictionary(all_fstdata(), entries(), connections, chardef.DATA, unknowns.DATA)
    self.assertEqual(7, len(sys_dic.lookup('形態素'.encode('utf-8'))))
    self.assertEqual(1, sys_dic.get_trans_cost(0, 1))
    self.assertEqual({'HIRAGANA': []}, sys_dic.get_char_categories('は'))
    self.assertEqual({'KATAKANA': []}, sys_dic.get_char_categories('ハ'))
    self.assertEqual({'KATAKANA': []}, sys_dic.get_char_categories('ﾊ'))
    self.assertEqual({'KANJI': []}, sys_dic.get_char_categories('葉'))
    self.assertEqual({'ALPHA': []}, sys_dic.get_char_categories('C'))
    self.assertEqual({'ALPHA': []}, sys_dic.get_char_categories('Ｃ'))
    self.assertEqual({'SYMBOL': []}, sys_dic.get_char_categories('#'))
    self.assertEqual({'SYMBOL': []}, sys_dic.get_char_categories('＃'))
    self.assertEqual({'NUMERIC': []}, sys_dic.get_char_categories('5'))
    self.assertEqual({'NUMERIC': []}, sys_dic.get_char_categories('５'))
    self.assertEqual({'KANJI': [], 'KANJINUMERIC': ['KANJI']}, sys_dic.get_char_categories('五'))
    self.assertEqual({'GREEK': []}, sys_dic.get_char_categories('Γ'))
    self.assertEqual({'CYRILLIC': []}, sys_dic.get_char_categories('Б'))
    self.assertEqual({'DEFAULT': []}, sys_dic.get_char_categories('𠮷'))
    self.assertEqual({'DEFAULT': []}, sys_dic.get_char_categories('한'))
    self.assertTrue(sys_dic.unknown_invoked_always('ALPHA'))
    self.assertFalse(sys_dic.unknown_invoked_always('KANJI'))
    self.assertTrue(sys_dic.unknown_grouping('NUMERIC'))
    self.assertFalse(sys_dic.unknown_grouping('KANJI'))
    self.assertEqual(2, sys_dic.unknown_length('HIRAGANA'))