论坛: 公開討議 (Thread #34688)

感謝及びお願い (2013-11-03 20:28 by YUKIHIKO #70673)

大久保様

数々の素晴らしいプロジェクトを公開していただき、ありがとうございます。
毎日有難く利用させていただいております。

プログラム言語などまったく分からない私ですが、EPWINGの大ファンなので、単語対訳集や文例集などを一つ一つ入力するという形で作っています。
先日、とある英語辞書のデータをとりだす事に成功いたしましたが、どうやってEBStudioに認識できるHTML形式に変換できるか見当がつきません。
取り出された辞書内容の一部を以下に書き込ませていただきます。

decide on
PHRASAL VERB
If you decide on something or decide upon something, you choose it from two or more possibilities.
After leaving university, Therese decided on a career in publishing.

decided
ADJ-GRADED: ADJ
Decided means clear and definite.
They got involved in a long and exhausting struggle and were at a decided disadvantage in the afternoon.
He's a man of very decided opinions.

decidedly
ADV-GRADED: ADV
Decidedly means to a great extent and in a way that is very obvious.
He admits there will be moments when he's decidedly uncomfortable at what he sees on the screen.
Representatives of the other branches adopted a decidedly different view.
It soon became clear that authors were decidedly in the majority.

ご覧の通り、[m2][*][ex]などのタブを削除・置換することができますが、後はEBStudioに認識できる<dt></dt>や<dd></dd>などの要素をどういう風に付加すれば宜しいでしょうか。
お忙しいのは重々承知しております。ご都合の宜しい時に、差し支えない範囲でご教示いただければと思っております。
ありがとうございます。

回复到 #70673×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-04 15:29 by YUKIHIKO #70682)

大久保様

昨日の投稿には[m2][*][ex]などのタブを削除・置換することができますがという内容がありましたが、
最初に、こういったタブも一緒に書き込もうとしたんですが、スパムと見られ、投稿できなかったので、上のような形になってしまったのです。誤解を招きやすいようなことを書いてしまって申し訳ありません。お許しください。

書き出された辞書内容の本来の姿は次のようになっています。

まずは見出し項目で、その前後には何のタブもありません。それから改行して、[m2][*]<b><i>などの要素で解説文や例文を囲んでいます。それから、ひとつ空行があり、次の行からは「見出し項目-改行-タブ+辞書内容」という形の繰り返しです。

このような文字列はEPWINGに食わせられるHTML形式に変換することができるでしょうか。
よろしくお願いいたします。
回复到 #70673

回复到 #70682×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-05 18:45 by YUKIHIKO #70701)

大久保様

度々申し訳ありませんが、もしも、テキスト化された辞書の内容が以下のようになったら、EPWINGで使用できるHTML形式に変換することが可能でしょうか。

decide on
PHRASAL VERB
If you decide on something or decide upon something, you choose it from two or more possibilities.
After leaving university, Therese decided on a career in publishing.
decided
ADJ-GRADED: ADJ
Decided means clear and definite.
They got involved in a long and exhausting struggle and were at a decided disadvantage in the afternoon.
He's a man of very decided opinions.
decidedly
ADV-GRADED: ADV
Decidedly means to a great extent and in a way that is very obvious.
He admits there will be moments when he's decidedly uncomfortable at what he sees on the screen.
Representatives of the other branches adopted a decidedly different view.
It soon became clear that authors were decidedly in the majority.

最初の書き込みで示された辞書内容と違うところというと、空行がないということになりますが、説明文や例文には、[m2][*]<b><i>などのタブもついています。
ご検討いただければと思っております。


回复到 #70673

回复到 #70701×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-05 20:36 by ohkubo-k #70703)

YUKIHIKOさま、こんにちは、大久保です。
返事が遅れて申し訳ありません。
お役に立っているようで何よりです。ありがとうございます。

EBStudioは、ごくごく基本的なHTMLをEPWINGに変換するソフトです。
まずはこのあたりのマニュアルをご覧になることをおすすめします。
http://ebstudio.info/manual/EBStudio/
http://ebstudio.info/manual/EBStudio/5_0_2.html
EBStudioでサポートするHTML要素
http://ebstudio.info/manual/EBStudio/5_0_2_3.html
http://ebstudio.info/manual/EBStudio/5_0_2_3_1.html#htmltag_1
http://ebstudio.info/manual/EBStudio/5_0_2_3_2.html#htmltag_2

この掲示板上ではタブが消えたり、SPAM判定されたり(!初めて伺いました)と正しく伝わっていないかも知れませんが、EBStudioの入力ファイルは基本的には以下のようになります

<html><body>
<dt>decide on<dt><dd>
<p>PHRASAL VERB</p>
<p>If you decide on something or decide upon something, you choose it from two or more possibilities.</p>
<p>After leaving university, Therese decided on a career in publishing.</p></dd>
...
</body></html>

この様に作成したHTMLファイルをブラウザが正しく表示できるかが、最初のチェックになります。それをEBStudioでEPWINGに変換することになります。タグの対応が取れていないと、EBStudioの変換中にエラーメッセージで止まります。

HTMLファイルなので、改行は無視されます(<dt>改行<p>と<dt><p>は、見た目上同じ、のように)。
1行ごとの語釈を <p>...</p> でくくる事も出来ますし、<dd>....<br>....<br>...</dd> というように、<br>を改行に使うこともできます。<br>でも<br/>でもOKです。普通のHTMLと同じです。
それができたら、<i>...</i>, <b>...</b> で斜体や太字も試してみて下さい。href による辞書内ジャンプも普通のHTMLと全く同じです。

あと私がよく使うのは、インデントの深さの指定で
http://ebstudio.info/manual/EBStudio/5_0_2_3_11.html
にある <indent val="2"> のような指定です。左端の余白の量を指定します。

最初はいろいろ試行錯誤で大変かも知れませんが、やり方が分かってくれば自由自在です。
また何かありましたら、こちらにどうぞ。
回复到 #70673

回复到 #70703×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-05 20:41 by ohkubo-k #70704)

> http://ebstudio.info/manual/EBStudio/
> http://ebstudio.info/manual/EBStudio/5_0_2.html

いま改めて読み返して気づいたのですが
http://ebstudio.info/manual/EBStudio/5_0_2_1.html#chap6.1.2.1
には <dl>...</dl> を使うように書かれていますが、私は一度も使ったことがありません。
無くても良いのだと思います。
回复到 #70703

回复到 #70704×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-06 17:20 by YUKIHIKO #70714)

大久保様

さっそくご教示いただき、ありがとうございました。
EBStudioのマニュアルや教えていただいたスキルをもとに、色々試してみたいと思っております。

回复到 #70673

回复到 #70714×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-08 01:25 by YUKIHIKO #70728)

大久保様

先日の件はお陰様で、無事に変換できているようです。辞書としてはまだまだ変更すべきところが沢山残っているようですが、とりあえず検索できるようになりました。ありがとうございます。

またお邪魔して申し訳ありませんが、辞書の本文の中に音声と図を入れたいんですけれども、どう取り込めばよろしいでしょうか。やはりebsファイルを作成しなければならないでしょうか。htmlの中の <a href="ooo6.wav">location</a>と実際の0006.wavファイルをどう関連づけたらいいか、EBStudioのマニュアルを読んでもはっきりとわかりません。教えていただければと思っております。よろしくお願いいたします。

回复到 #70673

回复到 #70728×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-08 21:41 by ohkubo-k #70740)

YUKIHIKOさま

第一関門はクリアしたようですね。

EBStudio で変換作業するのであれば、ebs ファイルは作る(作って保存する)必要があります。

画像・音声・動画の取り込み方はこちらにあります。
http://ebstudio.info/manual/EBStudio/5_0_2_3_7.html
画像ファイルとして使えるのは、ビットマップとJPEGだけです。

http://ebstudio.info/manual/EBStudio/5_0_2_3_8.html
動画のあるEPWINGを作ったことはありません。

> <a href="ooo6.wav">location</a>と実際の0006.wavファイルをどう関連づけたらいいか

HTMLファイルがあるフォルダに ooo6.wav を置く(普通のHTMLと同じです)ことになります。
EBStudioの入力ファイルが body.html として、

body.html
|- wav/
|- ooo6.wav

というように、wav フォルダに音声ファイルを置いた場合は、body.html に href="wav/ooo6.wav" と書くことになります。

また、EBStudio の オプション→詳細設定→マルチメディア の設定も、変更する必要があるかも知れません。
http://ebstudio.info/manual/EBStudio/4_3_3_4.html
「図版・動画・音声を作成する」をチェックするのはもちろんです。チェックがないとEPWINGに出ません。
音声ファイルは、「ヘッダ付」の方が問題が起きにくいようです(「波形のみ」としたら、EBWinで問題なくても、iPhoneで再生するとなぜか2倍早送り再生(1オクターブ高い音になる)になった経験があります)。

図版については、私は <img src="aaa.jpg"/> のようにしています。
もちろん、aaa.jpg は、HTMLファイルと同じ所に置く場合です。
pics フォルダに置くなら <img src="pics/aaa.jpg"/>などとなります。
EBStudioに食わせるHTMLファイルを普通にブラウザで開いて、ちゃんと画像が表示されればOK、ということです。
モノクロビットマップファイルは、画像サイズが 32 の倍数でなければならないようなので、私は JPEG ファイルを使うようにしています。
インライン画像指定とすると、UNIX上のEPWINGビューアーである EBView で問題があった覚えがあります。
ただ、EBView はあまり使われていないと思うので、あまり気にしなくても良いかと思います。

回复到 #70673

回复到 #70740×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-08 21:45 by ohkubo-k #70741)

[メッセージ#70740 へのフォロー]
> body.html
> |- wav/
> |- ooo6.wav

画面上で、空白が省略されてしまっていました。

body.html と wav フォルダは同一フォルダにあり、wav フォルダに ooo6.wav がある、というだけです。

body.html
wav/
  |- ooo6.wav

なら、意図したとおりになるでしょうか。

body.html
wav/
__|- ooo6.wav

これなら大丈夫なはず。
回复到 #70740

回复到 #70741×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-11 00:05 by YUKIHIKO #70761)

大久保様

色々丁寧に教えていただいてありがとうございます。
お陰様で、音声と図版入りの辞書作成に成功いたしました。まだまだ完全なものに程遠いですが、これから色々試して完成度の高い物にしていきたいと思っております。

これからもよろしくお願いいたします。

PS:Wordnetの英日版やTatoebaの日本語検索版を楽しみにしております。
回复到 #70673

回复到 #70761×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-12 18:09 by YUKIHIKO #70786)

大久保様

いつもお世話になっております。
またお邪魔して申し訳ありませんが、書籍内参照を具体的にどういう形で実現できるでしょうか。

やはり、下記のサイトに書いてあるようにしなければならないでしょうか。

http://ebstudio.info/manual/EBStudio/5_0_2_1.html

<a href="#中部山岳国立公園">中部山岳国立公園</a>という風に試してみたんですが、リンクの参照ができませんでした。

このやり方ではいけませんよね。

見出し項目に「id="000"」のような参照先を効率よくつけることができる方法ってありますか。

ご指導をお願いいたしたいんです。よろしくお願いいたします。

回复到 #70673

回复到 #70786×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-12 21:52 by ohkubo-k #70789)

YUKIHIKO様

hrefに指定できるのは、普通のHTML同様、id で指定されたラベル名だけです。

http://ebstudio.info/manual/EBStudio/5_0_2_1.html
の例で言えば、<a href="#id002431">中部山岳国立公園</a> などとなります。

http://ebstudio.info/manual/EBStudio/5_0_2_3_3.html
もご覧下さい。書いてあることは普通のHTMLと同じだ、と言うことですが。

> 見出し項目に「id="000"」のような参照先を効率よくつけることができる方法ってありますか。

普通は、プログラムで機械的に処理する部分かと思います。

英語辞典を作成されているようなので、見出し語が英字だけだとすると、
 <dt id="hello">hello</dt><dd>.......</dd>
というように、見出し語と、その見出し語のラベルを同じにするのも一つの手です。

 <dt>hello</dt><dd>...</dd>
 <dt>iphone</dt><dd>...</dd>

 <dt id="hello">hello</dt><dd>...</dd>
 <dt id="iphone">iphone</dt><dd>...</dd>
に機械的に変換するには、正規置換が便利です。
例えば 秀丸エディタ の置換で、
 検索 <dt>(.+?)</dt>
 置換 <dt id="\1">\1</dt>
として正規全置換すると、idなしを一瞬で全部idありに置換できます。

そのうえで <a href="#hello">hello</a> とすれば、クリックすると hello にジャンプできるようになります。
プログラミング言語の習得は大変としても、正規検索・置換についてはマスターされると、大量のテキスト処理がいろいろ楽になりますよ。
回复到 #70673

回复到 #70789×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-13 23:12 by YUKIHIKO #70801)

大久保様

丁寧に教えていただき、ありがとうございました。

正規表現がすごく役立ちそうなので、1から勉強していきいって思っております。

週末にでも辞書の再作成に取り掛かろうって考えています。
お陰様で、音声や図版の作成には成功しています。ありがとうございました。

またお邪魔することになるかもしれません。よろしくお願いいたします。
回复到 #70673

回复到 #70801×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-22 01:23 by YUKIHIKO #70886)

大久保様

お世話になっておりますYUKIHIKOです。
またお邪魔して申し訳ありませんが、htmlをEBStudioに渡せる形に整形した後、どういうコードで保存し、外字を振り当てれば、英単語の発音記号も文字化けせず、綺麗に表示できるようになるのかをご指導いただけないでしょうか。
マニュアルを何度も読み返していますが、ピンときません。よろしくお願いいたします。

回复到 #70673

回复到 #70886×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-22 01:24 by YUKIHIKO #70887)

大久保様

お世話になっておりますYUKIHIKOです。
またお邪魔して申し訳ありませんが、htmlをEBStudioに渡せる形に整形した後、どういうコードで保存し、外字を振り当てれば、英単語の発音記号も文字化けせず、綺麗に表示できるようになるのかをご指導いただけないでしょうか。
マニュアルを何度も読み返していますが、ピンときません。よろしくお願いいたします。

回复到 #70673

回复到 #70887×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-25 21:45 by ohkubo-k #70914)

YUKIHIKOさん、こんにちは。

外字の処理は、EPWINGで一番面倒なところです。まあ、辞書本体のテキストを準備するよりは楽かも知れませんが。
まずはウムラウト付きの a など、EBStudioの附属サンプルを利用できる外字でいろいろ試してから、発音記号の外字作成に取り組まれるのがよいと思います。

関連マニュアルはこちらです。
http://ebstudio.info/manual/EBStudio/5_0_2_3_9.html
http://ebstudio.info/manual/EBStudio/5_0_8.html
http://ebstudio.info/manual/EBStudio/5_0_9.html


★HTMLファイルの文字コード
EBStudioのためのHTMLファイルは、ShiftJISファイルでなければなりません。
ShiftJISに無い文字は、通常のHTMLと同じく
1. Unicode表記 &#10進数; または &#x16進数;
2. ISO 8879の定義名 &copy;
のように書きます。

http://ja.wikipedia.org/wiki/Unicode%E4%B8%80%E8%A6%A7
の「IPA拡張」節に、発音記号とその文字コード(U+0250など)があります。
この 0250 などが文字コードの16進数表記です。先頭の 0 は省略可能です。
なので、EBStudioの原稿HTMLファイルに &#x250; と記せば、そこにひっくり返った a を出す事になります。
最初は、HTMLファイルをブラウザで表示して、ちゃんと表示される事をまず確認して下さい。


★外字置換定義ファイル
外字のUnicodeと、EPWINGでの外字コードの対応関係をまとめた XML ファイルです。手書きで作る必要があります。
C:\Program Files\EBStudio\sample\GaijiMap.xml が、サンプルです。
ファイル名は任意です。

外字コード番号は、A121~FE7F の範囲が、飛び飛びで使えます。
使えるのは A121~A17E, A221~A27E, A321~A37E, A421... という様になります。
先頭から順に使うのがルールのようです。

http://ebstudio.info/manual/EBStudio/5_0_8.html
をご覧下さい。
<gaijiMap name="Agrave" unicode="#x00C0" ebcode="A141" alt="A" />
の各パラメータが何なのかも、このページの末尾に書いてあります。


★外字フォントファイル
外字の 8x16 か 16x16 ドットデータを収めたファイルです。
ファイル名は任意です。

http://ebstudio.info/manual/EBStudio/5_0_9.html
これも手書きで一つ一つ作るしかありません。

既存のフォントから、指定した文字のビット画像データを作るための fontdump.exe が ebstudio.exe と同じフォルダにあります。
使い方は、同じフォルダの FontDump.txt にあります。
今は Unicode 版の fontdumpw.exe (wつき)を「○形式1:Windowsフォントからの変換」の要領で使えばよいでしょう。


★サンプル作成
ebstudio.exe のあるフォルダに sample.ebs があるはずです。
これからEPWINGを作り、辞書追加する(1つで3辞書)して、「エンティティ」という辞書を開くと、外字の表示例が出ます。


★EBWinで外字をUnicode文字できれいに表示するための外字定義ファイル
http://ebstudio.info/manual/EBPocket/0_0_4_4.html

さっきのEBStudioの「外字置換定義ファイル」の逆で、EBWinで外字をUnicodeに変換するためのファイルです。XMLで、手書きする必要があります。

ファイル名は、EPWINGの書籍ディレクトリ名.map になります。
これを作って、アプリケーションディレクトリ\GAIJI フォルダにおいて、EBWinを再起動すると、外字がきれいに表示されます。
  アプリケーションディレクトリ:
  http://ebstudio.info/manual/EBPocket/0_0_4_9.html#app_dir

この「書籍ディレクトリ名」は、EBStudioで指定してます。
 http://ebstudio.info/manual/EBStudio/4_2_2.html
他の辞書とかぶらないよう、適当な名前を指定して下さい。

http://ebstudio.info/manual/EBStudio/4_2_1.html
の(1)に出ている書籍名をダブルクリックすれば、上の設定画面が開きます。


★外字定義のファイル例
Project Zephyr にも外字関係のファイルが入っています。

羅和辞典用
http://sourceforge.jp/projects/projectzephyr/scm/svn/tree/head/kenkyusha-lajp/
アクセス独和用
http://sourceforge.jp/projects/projectzephyr/scm/svn/tree/head/access-dejp/
プチロワ用
http://sourceforge.jp/projects/projectzephyr/scm/svn/tree/head/petit-royal/
ロワ仏用
http://sourceforge.jp/projects/projectzephyr/scm/svn/tree/head/royal-frjp/

ここの Gaiji.xml, GaijiMap.xml の一部は参考になるかも知れません。
回复到 #70673

回复到 #70914×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

RE: 感謝及びお願い (2013-11-27 23:21 by YUKIHIKO #70930)

大久保様

親切且つ丁寧にご説明いただいてありがとうございました。
ご指導の通りにやってみます。どこまでやれるかわかりませんが、頑張ってみます。
ありがとうございました!
回复到 #70673

回复到 #70930×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录