Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
reading english words
  • Loading branch information
nishimotz committed Jun 21, 2015
1 parent 44f1d7c commit da03e39
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 3 deletions.
24 changes: 24 additions & 0 deletions include/jtalk/eng_dic_maker.py
Expand Up @@ -58,6 +58,8 @@ def make_dic(IN_FILE, CODE, THISDIR):
['insert', 'インサート'],
['iis', 'アイアイエス'],
['impaired', 'インペアド'],
['incorporate', 'インコーポレイト'],
['incorporates', 'インコーポレイツ'],
['java', 'ジャバ'],
['jaxa', 'ジャクサ'],
['konica', 'コニカ'],
Expand All @@ -82,6 +84,8 @@ def make_dic(IN_FILE, CODE, THISDIR):
['shared', 'シェアード'],
['shares', 'シェアーズ'],
['think', 'シンク'],
['threatened', 'スレッテンド'],
['thoroughly', 'サラフリィ'],
['talk', 'トーク'],
['tab', 'タブ'],
['tunes', 'チューンズ', '1/4', 10],
Expand Down Expand Up @@ -120,6 +124,7 @@ def make_dic(IN_FILE, CODE, THISDIR):
['ustream', 'ユーストリーム', None, 1000],
['ubuntu', 'ウブンツー', None, 1000],
['ware', 'ウェアー', None, 1000],
['warranties', 'ワランティーズ'],

['time', 'タイム', None, 1000],
['home', 'ホーム', None, 1000],
Expand All @@ -131,6 +136,7 @@ def make_dic(IN_FILE, CODE, THISDIR):
['favorites', 'フェイバリッツ', "1/6"],
['documents', 'ドキュメンツ', "1/5"],
['settings', 'セッティングズ', "1/6"],
['distributable', 'ディストリビュータブル', "5/9"],
['redistributable', 'リディストリビュータブル', "6/10"],
['app', 'アップ'],
['types', 'タイプス'],
Expand Down Expand Up @@ -208,15 +214,20 @@ def make_dic(IN_FILE, CODE, THISDIR):
['butt', 'バットゥ', "1/4", 10000],
['opened', 'オープンド', "1/5"],
['closed', 'クローズド', "2/5"],
['contributions', 'コントリビューションズ'],
['layered', 'レイヤード', '1/5'],
['required', 'リクワイアード', '3/7'],
['iconified', 'アイコニファイド', '1/8'],
['interactively', 'インタラクティブリィ'],
['focusable', 'フォウカサブル', '1/6'],
['editable', 'エディタブル', '1/5'],
['draggable', 'ドゥラッガブル', '2/6'],
['contains', 'コンテインズ', '3/6'],
['covered', 'カバード', '1/4'],
['considered', 'コンシダード'],
['errors', 'エラーズ'],
['previously', 'プリビアスリ'],
['permission', 'パーミッション'],
['entered', 'エンタード'],
['turns', 'ターンズ'],
['toggles', 'トグルズ'],
Expand All @@ -230,17 +241,30 @@ def make_dic(IN_FILE, CODE, THISDIR):
['characters', 'キャラクターズ'],
['keys', 'キーズ'],
['cycles', 'サイクルズ'],
['conspicuously', 'コンスピシャスリィ'],
['changed', 'チェインジド'],
['appropriately', 'アプロプリエトリィ'],
['agreed', 'アグリード'],
['levels', 'レベルズ'],
['speaks', 'スピークス'],
['simultaneously', 'サイマルテニアスリィ'],
['untitled', 'アンタイトルド'],
['flanger', 'フランジャー'],
['resample', 'リサンプル'],
['reuse', 'リユーズ'],
['runs', 'ランズ'],
['rendered', 'レンダード'],
['inaccurate', 'インアキュレイト'],
['epub', 'イーパブ'],
['expressly', 'エクスプレスリィ'],
['libre', 'リブレ'],
['gpu', 'ジーピーユー'],
['unicode', 'ユニコウドゥ'],
['drivers', 'ドゥライバーズ'],
['directly', 'ダイレクトリィ'],
['unicode', 'ユニコウドゥ'],
['usa', 'ユーエスエー', "0/6"],
['unenforceable', 'アンエンフォーサブル'],
['visum', 'ビズム'],
]
k = {}
Expand Down
18 changes: 18 additions & 0 deletions include/jtalk/roma_dic_maker.py
Expand Up @@ -313,6 +313,24 @@ def isGoodEntry(s):
return False
if a[0] == 'ex' and a[12] == 'エックスー':
return False
if a[0] == 'do' and a[12] == 'ドー':
return False
if a[0] == 'too' and a[12] == 'トオー':
return False
if a[0] == 'fee' and a[12] == 'フェエー':
return False
if a[0] == 'be' and a[12] == 'ベー':
return False
if a[0] == 'rea' and a[12] == 'レアー':
return False
if a[0] == 'son' and a[12] == 'ソンー':
return False
if a[0] == 'ran' and a[12] == 'ランー':
return False
if a[0] == 'he' and a[12] == 'ヘー':
return False
if a[0] == 'issi' and a[12] == 'イッシー':
return False
return True

def make_dic(CODE, THISDIR):
Expand Down
32 changes: 32 additions & 0 deletions jptools/mecabHarness.py
Expand Up @@ -455,4 +455,36 @@
{'text':"for each author's protection", 'speech':'フォー イーチ オーサーズ プロテクション'},
{'text':"for each authors' protection", 'speech':'フォー イーチ オーサーズ プロテクション'},
{'text':"using it", 'speech':'ユージング イットゥ'},
{'text':"distributable", 'speech':'ディストリビュータブル'},
{'text':"usa", 'speech':'ユーエスエー'},
{'text':"covered by", 'speech':'カバード バイ'},
{'text':"your programs too", 'speech':'ユア プログラムズ トゥー'},
{'text':"you can do", 'speech':'ユー キャン ドゥー'},
{'text':"such a program", 'speech':'サッチ エイ プログラム'}, # サッチ ア プログラム
{'text':"for a fee", 'speech':'フォー エイ フィー'}, # フォー ア フィー
{'text':"legal permission to copy", 'speech':'リーガル パーミッション トゥー コピー'},
{'text':"threatened", 'speech':'スレッテンド'},
{'text':"patent must be licensed", 'speech':'パテントゥ マストゥ ビー ライセンストゥ'},
{'text':"conspicuously and appropriately", 'speech':'コンスピシャスリィ アンドゥ アプロプリエトリィ'},
{'text':"you changed", 'speech':'ユー チェインジド'},
{'text':"interactively", 'speech':'インタラクティブリィ'},
{'text':"considered", 'speech':'コンシダード'},
{'text':"the offer", 'speech':'ザ オファー'}, # ジ オファー
{'text':"runs", 'speech':'ランズ'},
{'text':"expressly", 'speech':'エクスプレスリィ'},
{'text':"reason", 'speech':'リーズン'},
{'text':"simultaneously", 'speech':'サイマルテニアスリィ'},
{'text':"directly", 'speech':'ダイレクトリィ'},
{'text':"unenforceable", 'speech':'アンエンフォーサブル'},
{'text':"contributions", 'speech':'コントリビューションズ'},
{'text':"he or she", 'speech':'ヒー オア シー'},
{'text':"thoroughly", 'speech':'サラフリィ'},
{'text':"incorporates", 'speech':'インコーポレイツ'},
{'text':"incorporate", 'speech':'インコーポレイト'},
{'text':"reuse", 'speech':'リユーズ'},
{'text':"warranties", 'speech':'ワランティーズ'},
{'text':"agreed", 'speech':'アグリード'},
{'text':"being rendered inaccurate", 'speech':'ビイーイング レンダード インアキュレイト'},
{'text':"sustained by", 'speech':'サステインド バイ'},
{'text':"speech synthesiser", 'speech':'スピーチ シンセサイザー'},
]
11 changes: 8 additions & 3 deletions source/synthDrivers/jtalk/mecab.py
Expand Up @@ -273,8 +273,14 @@ def _makeFeatureFromLatinWordAndPostfix(org, ar):
postfix = u'ズ'
if ar[0].endswith(u'p') or ar[0].endswith(u'ke') or ar[0].endswith(u'rk'):
postfix = u'ス'
elif org == u'd':
elif org in (u'd', u'ed'):
postfix = u'ド'
elif org in (u'r', u'er'):
postfix = u'ア'
if ar[0].endswith(u'e'):
postfix = u'ザー'
ar[8] = ar[8][:-1]
ar[9] = ar[9][:-1]
hyoki = ar[0] + org
hin1 = ar[1]
hin2 = ar[2]
Expand Down Expand Up @@ -339,8 +345,7 @@ def Mecab_correctFeatures(mf, CODE_ = CODE):
h=hyoki, h1=hin1, h2=hin2, y=yomi, p=pron, m=mora
)
Mecab_setFeature(mf, pos-2, feature, CODE_=CODE_)
elif pos > 0 and ar[0] in (u's', u'd') \
and ar[1] == u'記号' and ar[2] == u'アルファベット':
elif pos > 0 and ar[0] in (u's', u'd', u'ed', u'r'):
# pattern 4 or 5
ar2 = Mecab_getFeature(mf, pos-1, CODE_=CODE_).split(',')
# pattern 5
Expand Down

0 comments on commit da03e39

Please sign in to comment.