OSDN Git Service

ti33527
authorTakuya Nishimoto <nishimotz@gmail.com>
Mon, 31 Mar 2014 03:15:07 +0000 (20:15 -0700)
committerTakuya Nishimoto <nishimotz@gmail.com>
Mon, 31 Mar 2014 03:15:07 +0000 (20:15 -0700)
include/jtalk/make_jdic.py
jptools/harness.py
source/synthDrivers/jtalk/translator2.py

index 6d1018b..6c7e702 100644 (file)
@@ -423,6 +423,12 @@ def filter_jdic(s):
                s = ",".join(a)\r
        elif a[0] == '作' and a[6] == '人名' and a[11] == 'ツクル':\r
                s = ""\r
+       elif a[0] == '宗谷岬' and a[12] == 'ソーヤミサキ':\r
+               a.append('ソーヤ ミサキ')\r
+               s = ",".join(a)\r
+       elif a[0] == '丹後半島' and a[12] == 'タンゴハントー':\r
+               a.append('タンゴ ハントー')\r
+               s = ",".join(a)\r
        return s\r
 \r
 def convert_jdic_file(src_file, src_enc, dest_file, dest_enc):\r
index 1d6ea42..e184520 100644 (file)
@@ -4476,9 +4476,9 @@ tests = [
 \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
        # 人名に造語要素が続く場合で、2拍以下の場合は\r
        # 続けるのが原則ですが、自立性が強く、意味の理解を助ける\r
index 6fe1a41..b05a125 100644 (file)
@@ -452,8 +452,9 @@ def should_separate(prev2_mo, prev_mo, mo, next_mo):
                        mo.hinshi1 == '名詞' and mo.hinshi2 == '一般':\r
                return True\r
        # 永田町 1\r
+       # 「岬」「峠」「半島」はマス空けが原則\r
        if prev_mo.hinshi2 == '固有名詞' and prev_mo.hinshi3 == '地域' and \\r
-                       mo.hinshi2 == '数':\r
+                       (mo.hinshi2 == '数' or mo.hyouki in ('岬', '峠', '半島')):\r
                return True\r
 \r
        # 晴れ/所に より\r