Ticket #28958

liblouisの日本語対応拡張

Date d'ouverture: 2012-07-09 10:47 Dernière mise à jour: 2017-10-29 13:37

Rapporteur:
Propriétaire:
État:
Ouvert [Owner assigned]
Jalon:
(Aucun)
Priorité:
6
Sévérité:
6
Résolution:
Aucun
Fichier:
Aucun

Détails

NVDA だけでなく GNOME や DAISY-pipeline など多くのオープンソースプロジェクトで点訳エンジン liblouis が使われています。

nvdajp は単に liblouis を置き換えるだけでなく、将来的に liblouis が日本語対応されるように働きかけていくのがよさそうです。

個人的に liblouis について調べてみた情報

過去にjcstehさんにTwitterで説明したこと

いままで日本語チームの Skype 会議で何度か議論して、カナ文字と記号のテーブルを liblouis に追加するのがせいぜいだろう、という話になりました。

このチケットでは、日本語のために liblouis の拡張を提案することについて扱います。

liblouis-liblouisxmlのメーリングリスト で、過去に日本語対応が検討されたことがあるかどうか質問してみました。

さっそく John J. Boyer さんやコア開発者のかたからコメントがあり、現状の仕様では日本語対応が難しいと認識されていることを確認できました。

また wrappers.c モジュールを使って日本語プラグインを作ることができるのではないか、という意見をいただきました。

Ticket History (3/16 Histories)

2012-07-09 10:47 Updated by: nishimoto
  • New Ticket "liblouisの日本語対応拡張" created
2012-10-17 15:50 Updated by: nishimoto
  • Priorité Update from 4 to 5 - moyen
2012-10-18 11:44 Updated by: nishimoto
Commentaire

IRC で mhameed さんに教わったのですが、liblouis/test/harness に JSON 形式のテストデータがあります。

Unicode の点字記号が使われています。

en-GB-g2-harness.txt の「英語から英語点字」の例:

        {
          "comment": [
            "an example of a simple message being forward translated, and contractions expected."
          ], 
          "input": "the cat sat on the mat", 
          "output": "⠮ ⠉⠁⠞ ⠎⠁⠞ ⠕⠝ ⠮ ⠍⠁⠞"
        }, 

逆変換の例:

        {
          "comment": [
            "an example of testing simple backtranslation."
          ], 
          "input": "⠮ ⠉⠁⠞ ⠎⠁⠞ ⠕⠝ ⠮ ⠍⠁⠞", 
          "output": "the cat sat on the mat"
        }, 

この形式で日本語の点訳のテストケースを整備して、liblouis 開発者と相談するのがよさそうです。

2012-10-19 18:49 Updated by: nishimoto
Commentaire

liblouis の日本語対応について mhameed さんと議論しました。

これまで作ったテストケースやかな文字テーブルなどを整備して、今後 liblouis 本家のMLでやりとりします。

http://www.freelists.org/list/liblouis-liblouisxml

本家の 2013.1 までにある程度の進展を目指すことにします。

NVDA 日本語版が完全に liblouis ベースに移行するかどうかは別として、まずは本家 2013.1 に何らかの日本語点字テーブルを入れることを目指します。

2012-10-21 23:48 Updated by: nishimoto
Commentaire

本家のチケット2736 "support for Japanese braille" が登録されました。

http://www.nvda-project.org/ticket/2736

2012-11-02 22:38 Updated by: nishimoto
Commentaire

以下のコミットについて説明します。

lp:~nvdajp/nvdajp/jp2012.3 rev 5622

NVDA の内部で使われている liblouis の Python バインディングを使うテストプログラムを追加しました。

liblouis の出力は NABCC なので、さらに nabcc2dots モジュールを通してドット列表記に変換しています。

liblouis.dll があるディレクトリで実行する必要があるので、NVDA をソースから実行できる環境を作って、下記のようにして動かします。

> cd source
> python ..\jptools\louisRunner.py
2.5.1

(u',hello _w6', [0, 0, 1, 2, 3, 4, 5, 6, 6, 11], [1, 2, 3, 4, 5, 6, 7, 7, 7, 7,
7, 9], 6)
6 125 15 123 123 135 0 456 2456 235

(u';,c++', [0, 0, 0, 1, 2], [2, 3, 4], 2)
56 6 14 346 346

(u';,c"6"6', [0, 0, 0, 1, 1, 2, 2], [2, 3, 5], 2)
56 6 14 5 235 5 235

NVDA は dotsIO | pass1Only モードで liblouis を使っています。

translate() 関数に mode = dotsIO オプションをつけて動かすと NABCC ではなく1マス8ビットの(デバイスに直接送られる形式の)バイト列を出力するようです。

なお 点字設定「カーソル位置の単語をコンピューター点字に展開」(Expand to computer braille for the word at the cursor) に相当する処理は mode = compbrlAtCursor に対応します。

このモードの有無による C++ という入力の結果の違いは下記の通りです(UEBC-g1 の場合)。

t = translate([b'louis/tables/UEBC-g1.utb'], 'C++', cursorPos=0)
print(t)
print(nabcc2dots(t[0]))

# (u';,c"6"6', [0, 0, 0, 1, 1, 2, 2], [2, 3, 5], 2)
# 56 6 14 5 235 5 235

t = translate([b'louis/tables/UEBC-g1.utb'], 'C++', cursorPos=0, mode=compbrlAtCursor)
print(t)
print(nabcc2dots(t[0]))

# (u'c++', [0, 1, 2], [0, 1, 2], 0)
# 14 346 346

「カーソル位置の単語をコンピューター点字に展開」に相当するオプションが有効のときには、カーソル位置の単語について、大文字のCと小文字のCは区別しない(大文字符がつかない)ようです。また + (プラス)は前置記号なしの 346 となります。

2012-11-03 11:20 Updated by: nishimoto
Commentaire

NVDA (liblouis) の「カーソル位置の単語をコンピューター点字に展開」は、以下のような機能だと思われます。

  • カーソル位置の前後を(スペースを単語境界として?)探索して、その「単語」の文字がすべて NABCC の文字と記号かどうかを調べる
  • もし NABCC で表現できるなら、その部分(単語)を NABCC で出力する

こう解釈すると「C++ を変換したときに、大文字のCと小文字のCは区別しない(大文字符がつかない)、また + (プラス)は前置記号なしの 346 となる」という挙動は NABCC そのものなので、おかしくありません。

NVDA の日本語訳における「コンピューター点字」は NABCC の翻訳として適切かどうか、ご意見を伺いたいところです。

また、カーソル位置の単語を NABCC で出力するという NVDA 本家の機能が、日本語の環境にふさわしいかどうかも、御議論いただければ幸いです。

参考

2012-11-20 08:09 Updated by: nishimoto
Commentaire

2012年11月19日のSkype会議にて、現状の「カーソル位置の単語をコンピューター点字(NABCC)に展開」の機能は日本の点字ユーザーにとって有用な機能とはいえないが、言語ごとに仕様をカスタマイズできないのであれば、間違えて使わないように配慮をしてはどうか、というご意見を伺いました。

2013-02-03 14:58 Updated by: nishimoto
Commentaire

NVDA 本家が日本語点字対応のマイルストーンを 2013.2 に変更したことに対して、以下のようにコメントしました。

http://www.nvda-project.org/ticket/2736#comment:4

 I agree with this decision.

 NVDA Japanese Team is developing a forked version called
 [http://www.nvda.jp/en NVDAJP], which contains experimental Japanese
 braille support.
 We are intensively working to improve the quality of Japanese braille
 translation toward the 2013.1jp, which is the Japanese version of 2013.1.

 This work includes the development of test harness of Japanese braille,
 which is publicly hosted at
 [http://bazaar.launchpad.net/~nvdajp/nvdajp/jpmain/view/head:/jptools/harness.py
 launchpad repository], based on the rules made by the Braille Authority of
 Japan (BAJ).
 BAJ rules consist of the rule for braille translation for books of general
 interests, and the rule for books for information processing.
 Neither NABCC nor UEB is accepted by Japanese braille users at all.
 The BAJ rule for information processing books is so outdated that it does
 not cover Japanese full-shape characters.
 Because of the incompleteness and the complexity of BAJ rules as the
 screen reading application, commercial screen readers in Japan are making
 their translation rules, which are useful but not fully compliant with
 BAJ.
 We must make many decisions regarding punctuations, half-shape and full-
 shape symbols.

 In parallel, prototype version of translator, written in Python, is under
 development.
 It uses Japanese Text-to-Speech dictionary for the transliteration from
 Japanese ideographic characters to phonetic characters.
 Brltty Japanese table, mentioned above, does not cover Japanese
 ideographic characters at all.

 Our next step will be the combination of Japanese language-depended part
 (which handles semantic contexts based on the Japanese transliteration
 dictionary) and language-independent part (which is table-oriented process
 that liblouis can handle).
 I am not sure all the necessary process can be written as liblouis table
 without using C-based enhancements.

 The goal is to contribute the Japanese braille translator as an
 enhancement of liblouis, which will be also used in mainstream version of
 NVDA.
 However, the work takes much more time.
2013-02-07 20:06 Updated by: nishimoto
2013-07-07 23:49 Updated by: nishimoto
Commentaire

bitbucket の NVDA Addon Team から nishimotz が下記のリポジトリの write access をもらいました:

https://bitbucket.org/nvdaaddonteam/liblouis

ここでは liblouis の本家のレポジトリと独立して、主に NVDA 関係者が韓国語やUEBへの対応、テストケースの整備を行っています。

日本語対応をやってほしいという話になるのでしょうか。。

2014-02-05 00:14 Updated by: nishimoto
  • Composant Update from 点字ディスプレイ to 依存モジュール
2014-05-09 19:57 Updated by: nishimoto
Commentaire

John Boyer さんが liblouis プロジェクトを引退して Mesar Hameed, Bert Frees, Christian Egli の3人によるチームがプロジェクトを引き継いだという告知:

http://issues.liblouis.org/posts/2014-05-06-maintainership-succession/

2017-08-13 11:39 Updated by: nishimoto
  • Sévérité Update from 5 - moyen to 6
  • Priorité Update from 5 - moyen to 6
Commentaire

そろそろかなと思うので NVDA 日本語チームの GitHub レポジトリとして liblouis の fork を作りました:

https://github.com/nvdajp/liblouis

まずは自動テストを回せるようにしたいと思いますが、 Windows ではなく Linux を前提とした環境構築をするかも知れません。 いろいろ試してみて判断します。

NVDA 日本語版のビルド用のサブモジュールは変更しません。 できれば liblouis 本家版にマージされたものが NVDA 本家版から降ってくるようにしたいです。

2017-08-13 13:06 Updated by: nishimoto
Commentaire

Linux Subsystem for Windows でコンパイルして make check まで実行できたので下記に記録しておく。

https://ja.nishimotz.com/liblouis

このページには過去の日本語化のための実験メモが含まれているが、 いまとなってはあまり役に立たないかも。。

いちおう liblouis 本家に合わせて travis-ci のアカウントも作ったがまだ運用していない。

2017-10-29 13:37 Updated by: nishimoto
Commentaire

NVDA 日本語チームとしての liblouis 拡張は、当面は下記の GitHub Issue で扱います。

https://github.com/nvdajp/nvdajp/issues/50

開発者会が終わったら NVDA 日本語版の liblouis を本家版から独自版に切り替えて、 NVDA 側の独自実装をできるだけ削りたいと思います。

Attachment File List

No attachments

Modifier

Please login to add comment to this ticket » Connexion