User:RickCogley > Japanese Text and Attachment Search Test 日本語テキスト及び添付検索テスト

Japanese Text and Attachment Search Test 日本語テキスト及び添付検索テスト

Attachments

See the attachments on this page, for testing search capabilities. The Japanese text below, courtesy Wikipedia's Japanese entry on the Genji Monogatari, is what is contained in the attached files.  

Word Search Test File Contents

なお、平安時代末期に成立したと見られる『源氏物語絵巻』には、絵に添えられた詞書として『源氏物語』の本文と見られるものが記されており、その中には現在知られている『源氏物語』の本文と大筋で同じながら現在発見されているどの写本にも見られない本文が含まれている。この本文は、現在確認されている限りで最も古い時代に記された『源氏物語』の本文ということになるが、「絵巻の詞書」というその性質上もともとの本文の要約である可能性などもあるため本来の『源氏物語』本文をどの程度忠実に写し取っているのか解らないとして本文研究の資料としては使用できないとされている。

Excel Search Test File Contents

『源氏物語』の原文は、専門的な教育なしには、現代人にはかなり難しいもので、瀬戸内寂聴訳が、近年、ベストセラーになったように、むしろ現代語訳で親しんでいる人々の方が多いと言える。数ある日本の古典文学の中でも、恐らくその豊かな内容の故に、最も現代語訳が試みられており、また訳者に作家が多いのも特徴である。

Powerpoint Search Test File Contents

古い時代に作られ現在まで伝わっている実際の写本は、出来上がった写本が完成当時の姿をそのまま伝えられていることは少なく、一部が欠けてしまったり、その欠けた部分を補うために別の写本と組み合わせたり、別系統の本文を持った写本と校合されていることも少なくない。またこのような状態の写本を元にしてそのまま写した写本を作成したために最初に完成した時点ですでに巻ごとに異なった系統の本文になったと見られる写本も存在する。 

PDF Search Test File Contents

The PDF is a print of the file listing only, so searches on the filenames, if working, should generate a "hit" for this file.  

PDFにはファイル名の一覧が入っているので、PDF内容検索が上手く行っていれば、ファイル名を検索すると、ヒットするはず。

Zip File Contents

The zip contains all the test search files.  

Zipファイルは、テストファイル全てを含んでいる。 

Problem Characters

よく文字化けする文字テスト

Ы

Test Results 結果

Test on WikiOpengarden as of 25 Nov 2007 - Hayes+(?)

On this site, with I assume a default implementation, searches return hits on filenames, and on powerpoint contents. Word, Excel and PDF all fail.  

   Filename File Contents
 Word  OK  Failed
 Excel  OK  Failed
 Powerpoint  OK  OK
 PDF  OK  Failed

 

 

 

 

Toward Resolution 添付検索問題の改善に向けて

Lucene search in Deki Wiki is set up to index attachments by converting them to text using "filters". The filters are installed as packages during the Deki Wiki install process, and then somehow copied to /var/www/deki-hayes/bin/filters, where they are referenced by the startup xml file /var/www/deki-hayes/config/mindtouch.deki.startup.xml. Refer to the snip below.

Deki Wikiの検索エンジンは、フィルターを使い添付をテキストに変換して、インデックスしてます。Deki Wikiのインストール時、vwTextやpdf2textをパッケージとして導入して、/var/www/deki-hayes/bin/filtersにどうにかコピーされます。起動時、/var/www/deki-hayes/config/mindtouch.deki.startup.xmlと言う、スタートアップXMLよりロードされます。startup.xmlの一部を、以下をご参照。

<indexer>
     <path.store>/usr/local/var/luceneindex</path.store>
        <filter-path extension="doc">/var/www/deki-hayes/bin/filters/wvText</filter-path>
        <filter-path extension="pdf">/var/www/deki-hayes/bin/filters/pdf2text</filter-path>
        <filter-path extension="xhtml">/var/www/deki-hayes/filters/html2text</filter-path>
        <filter-path extension="html">/var/www/deki-hayes/bin/filters/html2text</filter-path>
        <filter-path extension="htm">/var/www/deki-hayes/bin/filters/html2text</filter-path>
        <filter-path extension="docx">/var/www/deki-hayes/bin/filters/docx2txt</filter-path>
        <filter-path extension="odt">/var/www/deki-hayes/bin/filters/odt2txt</filter-path>
        <filter-path extension="odp">/var/www/deki-hayes/bin/filters/odp2txt</filter-path>
        <filter-path extension="ppt">/var/www/deki-hayes/bin/filters/ppt2txt</filter-path>
        <filter-path extension="pptx">/var/www/deki-hayes/bin/filters/pptx2txt</filter-path>
        <filter-path extension="xls">/var/www/deki-hayes/bin/filters/xls2txt</filter-path>
        <filter-path extension="pl"></filter-path>
        <filter-path extension="c"></filter-path>
        <filter-path extension="h"></filter-path>
        <filter-path extension="inc"></filter-path>
        <filter-path extension="php"></filter-path>
        <filter-path extension="cs"></filter-path>
        <filter-path extension="txt"></filter-path>
        <filter-path extension="csv"></filter-path>
        <filter-path extension="xml"></filter-path>
        <filter-path extension="xsl"></filter-path>
        <filter-path extension="xslt"></filter-path>
</indexer>


However, while Lucene search is working in Japanese for wiki pages (after cursory testing), it is not working for attachments. From reading some pages on the internet, it seems that these filter utilities have to be set to work in Japanese.

Wikiページ自体でLucene検査は、ザッとテストした結果動いてそうだが、添付は中途半端。フィルターを、ちゃんと日本語を認識するように、設定しないと行けないだろう。

Resolution Strategies 改善策

PDF Indexing in Japanese

If you enable the multiverse repository in /etc/apt, you can install xpdf-japanese, which includes a PDF text extractor "pdf2text" that works on Japanese PDFs. Deki Wiki originally uses pdftohtml, which is based on xpdf, but which ignores the xpdf resource config file. A filter would have to be set up for this to work correctly.   

Here is a successful method for enabling PDF Indexing in Japanese.  

日本語PDFにて、インデックス作成が成功できました。見つかった方法をご覧ください。

Word Document Indexing in Japanese

I got Word indexing working in Japanese, using wvHtml piped to html2text in a filter, instead of using wvText, which munges the Japanese.

Excel Document Indexing in Japanese

I got Excel indexing working by installing Java. The filter program works by default if you have java installed.

Tag page

Files 14

FileSizeDateAttached by 
 Archive.zip
No description
71.71 kB23:39, 24 Nov 2007RickCogleyActions
 Deki Search Test Japanese.pdf
No description
23.42 kB23:39, 24 Nov 2007RickCogleyActions
 Deki Search Test Japanese Powerpoint.ppt Preview
No description
82.5 kB23:39, 24 Nov 2007RickCogleyActions
 Deki Search Test Nihongo Excel.xls Preview
No description
28.5 kB23:39, 24 Nov 2007RickCogleyActions
 Deki Search Test Nihongo Word.doc Preview
No description
19.5 kB23:39, 24 Nov 2007RickCogleyActions
 Deki Search Test 日本語.pdf
No description
23.42 kB23:39, 24 Nov 2007RickCogleyActions
 Deki Search Test 日本語 エクセル.xls Preview
No description
28.5 kB23:39, 24 Nov 2007RickCogleyActions
 Deki Search Test 日本語 パワーポイント.ppt Preview
No description
82.5 kB23:39, 24 Nov 2007RickCogleyActions
 Deki Search Test 日本語 ワード.doc Preview
No description
19.5 kB23:39, 24 Nov 2007RickCogleyActions
 resources-ja.jp.txt Preview
No description
57.21 kB23:39, 24 Nov 2007RickCogleyActions
 エクセルテスト.xls Preview
MS Execl2003添付文書が検索にヒットするかテストするためのテストデータ
15 kB04:07, 21 Nov 2007MioActions
 パワポテストファイル.ppt Preview
MS PowerPointl2003添付文書が検索にヒットするかテストするためのテストデータ
10 kB04:07, 21 Nov 2007MioActions
 日本語テスト.pdf
Export of Japanese page via OS/X Leopard's Print PDF function.
62.46 kB02:36, 12 Nov 2007RickCogleyActions
 添付文書検索テスト.doc Preview
MS Word2003添付文書が検索にヒットするかテストするためのテストデータ
23.5 kB04:07, 21 Nov 2007MioActions
Viewing 15 of 15 comments: view all
添付ファイルの内容は検索できるのでしょうか?
Posted 10:11, 20 Nov 2007
Added a number of files for search testing, to those uploaded by Mio already. In case the Japanese filenames are a problem, I uploaded each file twice - one with Japanese in the filename, and the other without. There are Word, Excel, Powerpoint and PDF files.
Posted 23:40, 24 Nov 2007
結局デフォルト設定では、ファイル名ら、Powerpointの内容、とウィキのページ自体は検索にヒットする。
Posted 00:04, 25 Nov 2007
日本語検索ハイライトもOKみたい。
Posted 00:06, 25 Nov 2007
Wikiのページがヒットするのは当たり前として、添付はパワーポイントはOKなんですか。あと最低限PDFは欲しいですね。
Posted 02:24, 25 Nov 2007
XPdf と言うやつがあって、これ使えるみたいです。でも、このBinaryにArgsがあると、どのようにFilterで指定するのかな、と悩むところ。

ftp://ftp.foolabs.com/pub/xpdf/xpdf-japanese.tar.gz
Posted 03:17, 25 Nov 2007
ところで、Source Installやるのであれば、Linodeで、Ubuntuで割にすんなりインストールしてくれたね。CentOSはとんでもなく難しくGive Up!
Posted 03:18, 25 Nov 2007
Debianでインストールしていたけど、どうにも難しいので
CentOSで再チャレンジしてますが、まだ、先は長そうです。
Posted 07:32, 25 Nov 2007
CentOSは大変だった。一日やってみて、あまりにもPackageがなくて、NGだったので、Ubuntuで成功。

考慮点:php5-mcryptが普通のDistroにはないので、/etc/apt/sources.listを編集。これらをUncomment:

deb http://archive.ubuntu.com/ubuntu/ gutsy universe
deb-src http://archive.ubuntu.com/ubuntu/ gutsy universe

それから、php5.confも、一行を足さないと行けない。以下、3行目を足す:

root@fire:/etc/apache2/mods-available # cat php5.conf
<IfModule mod_php5.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php4 .php5
</IfModule>

で動いてくれた。
Posted 08:40, 25 Nov 2007
あと、これをやると、いろいろ「普通使うやつ」が入るので楽:

aptitude install ubuntu-standard
Posted 08:41, 25 Nov 2007
Rickさん

ありがとうございます!、早速エンジニアチームに内容を伝えました。
無事解決してインストールしてくれるといいのですが・・

他にもTipsとかありましたら、教えてください!
Posted 03:09, 26 Nov 2007
xpdf-japaneseと言う、Debian/Ubuntuのパッケージがあり、これを入れると日本語OKのpdf2textは使える。Deki WikiのFilterを作成して、これを試します。
Posted 09:39, 26 Nov 2007
PDFの部分解決:http://cogley.wik.is/Knowledgebase/Deki_Wiki/Installing_Support_for_Japanese_PDF_to_Text_Conversion_for_Deki_Wiki
Posted 02:02, 27 Nov 2007
Got Japanese Word indexing working too.
Posted 14:00, 27 Nov 2007
Got Japanese Excel indexing working by installing java (doh!).
Posted 23:55, 27 Nov 2007
Viewing 15 of 15 comments: view all
You must login to post a comment.
Powered by MindTouch Deki Enterprise Edition v.8.08 RC1