OSDN Git Service

updated mecab dictionary
authorTakuya Nishimoto <nishimotz@gmail.com>
Mon, 7 Apr 2014 03:31:29 +0000 (20:31 -0700)
committerTakuya Nishimoto <nishimotz@gmail.com>
Mon, 7 Apr 2014 03:31:29 +0000 (20:31 -0700)
include/jtalk/custom_dic_maker.py
include/jtalk/make_jdic.py
jptools/harness.py

index 5666f07..98cc06a 100644 (file)
@@ -351,6 +351,30 @@ jdic = [
        {'text':'ト ゚', 'speech':'ト'}, # U+309a\r
        #{'text':'ト゜', 'speech':'ト'}, # U+309c\r
        #{'text':'ト゚', 'speech':'ト'}, # U+ff9f\r
+\r
+       # 仝   4edd    [ドージョー]       ドージョー\r
+       {'text':'仝', 'braille':'ドージョー', 'cost':5000},\r
+\r
+       # ノノ字点(ののじてん)・同じく記号\r
+       # 〃   3003    [オナジク]  オナジク\r
+       {'text':'〃', 'braille':'オナジク', 'cost':5000},\r
+\r
+       # 二の字点(にのじてん)\r
+       # 〻    303b\r
+       {'text':'各〻', 'braille':'オノオノ'},\r
+       {'text':'屡〻', 'braille':'シバシバ'},\r
+\r
+       # くの字点(くのじてん)\r
+       # 〱    3031 くの字点\r
+       # 〲    3032 くの字点(濁点)\r
+       # 〳    3033 くの字点上\r
+       # 〴    3034 くの字点上(濁点)\r
+       # 〵    3035 くの字点下\r
+       {   'text':'〱', 'braille':'クノジテン'},\r
+       {   'text':'〲', 'braille':'クノジテン ダクテン'},\r
+       {   'text':'〳', 'braille':'クノジテン ウエ'},\r
+       {   'text':'〴', 'braille':'クノジテン ウエ ダクテン'},\r
+       {   'text':'〵', 'braille':'クノジテン シタ'},\r
 ]\r
 \r
 class DicItem(object):\r
@@ -368,8 +392,11 @@ class DicItem(object):
                        self.text = a['text']\r
                        if 'speech' in a:\r
                                self.speech = a['speech']\r
-                       else:\r
+                       elif 'braille' in a:\r
                                self.speech = a['braille'].replace(' ', '').replace('/', '')\r
+                       else:\r
+                               print 'data error: ' + str(a)\r
+                               sys.exit(1)\r
                        self.accent = a['accent'] if 'accent' in a else None\r
                        self.cost = a['cost'] if 'cost' in a else None\r
                        self.pos = a['pos'] if 'pos' in a else None\r
index c6dfecc..243c912 100644 (file)
@@ -432,6 +432,14 @@ def filter_jdic(s):
        elif a[0] == 'もうすぐ' and a[12] == 'モースグ':\r
                a.append('モー スグ')\r
                s = ",".join(a)\r
+       elif a[0] == '仝':\r
+               # 同上記号\r
+               # 仝   4edd    [ドージョー]       ドージョー\r
+               s = "" # custom_dic_maker\r
+       elif a[0] == '〃':\r
+               # ノノ字点(ののじてん)・同じく記号\r
+               # 〃   3003    [オナジク]  オナジク\r
+               s = "" # custom_dic_maker\r
        return s\r
 \r
 def convert_jdic_file(src_file, src_enc, dest_file, dest_enc):\r
index e8fc5d4..2cf525a 100644 (file)
@@ -4540,17 +4540,17 @@ tests = [
 \r
        # 同上記号\r
        # 仝   4edd    [ドージョー]       ドージョー\r
-       #{   'text':'仝', 'input':'ドージョー'},\r
+       {   'text':'仝', 'input':'ドージョー'},\r
 \r
        # ノノ字点(ののじてん)・同じく記号\r
        # 〃   3003    [オナジク]  オナジク\r
-       #{   'text':'〃', 'input':'オナジク'},\r
+       {   'text':'〃', 'input':'オナジク'},\r
 \r
        # 二の字点(にのじてん)\r
        # 文字説明に未登録\r
        # 〻    303b\r
        #{   'text':'〻', 'input':'ニノジテン'},\r
-       #{   'text':'各〻', 'input':'オノオノ'},\r
+       {   'text':'各〻', 'input':'オノオノ'},\r
        {   'text':'屡〻', 'input':'シバシバ'},\r
 \r
        # くの字点(くのじてん)\r
@@ -4560,11 +4560,11 @@ tests = [
        # 〳    3033 くの字点上\r
        # 〴    3034 くの字点上(濁点)\r
        # 〵    3035 くの字点下\r
-       #{   'text':'〱', 'input':'クノジテン'},\r
-       #{   'text':'〲', 'input':'クノジテン ダクテン'},\r
-       #{   'text':'〳', 'input':'クノジテン ウエ'},\r
-       #{   'text':'〴', 'input':'クノジテン ウエ ダクテン'},\r
-       #{   'text':'〵', 'input':'クノジテン シタ'},\r
+       {   'text':'〱', 'input':'クノジテン'},\r
+       {   'text':'〲', 'input':'クノジテン ダクテン'},\r
+       {   'text':'〳', 'input':'クノジテン ウエ'},\r
+       {   'text':'〴', 'input':'クノジテン ウエ ダクテン'},\r
+       {   'text':'〵', 'input':'クノジテン シタ'},\r
 \r
        ]\r
 \r