DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:asiansearch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:asiansearch [2009-09-06 18:58] kazmiyaplugin:asiansearch [2023-10-30 23:21] (current) Klap-in
Line 1: Line 1:
- 
 ====== Asian Search Plugin ====== ====== Asian Search Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: Manipulates a search query for a better search experience in Asian languages+description: Provides a better search experience in Asian languages
 author     : Kazutaka Miyasaka author     : Kazutaka Miyasaka
 email      : kazmiya@gmail.com email      : kazmiya@gmail.com
 type       : action type       : action
-lastupdate : 2009-09-06 +lastupdate : 2011-04-26 
-compatible : 2009-02-14+compatible : Lemming, Anteater, Rincewind
 depends    :  depends    : 
-conflicts +conflicts pageredirect
 similar    :  similar    : 
-tags       : asiancjk, highlight, search+tags       : !obsoletelanguage, search 
 + 
 +downloadurl: https://github.com/kazmiya/dokuwiki-plugin-asiansearch/zipball/master 
 +bugtracker : https://github.com/kazmiya/dokuwiki-plugin-asiansearch/issues 
 +sourcerepo : https://github.com/kazmiya/dokuwiki-plugin-asiansearch 
 +donationurl: 
 ---- ----
  
-This plugin provides a better search experience in Asian languages by manipulating a search queryNo re-indexing is required.+| :!: **You don't need to install this plugin on DokuWiki 2011-04 "Rincewind".** As of Rincewind, all searching problems with Asian languages seem solvedIf you have already installed this plugin, you are safe to uninstall it|
  
 ===== Download and Installation ===== ===== Download and Installation =====
  
-Download and install the plugin using the [[:plugin:plugin|Plugin Manager]] using the following URL. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. 
  
-^ Download [[http://cloud.github.com/downloads/kazmiya/dokuwiki-plugin-asiansearch/dokuwiki-plugin-asiansearch.zip|dokuwiki-plugin-asiansearch.zip]] +Alternatively, refer to [[:Plugins]] on how to install plugins manuallyIf you are manually installing, you need to rename the extracted directory to "asiansearch"
-^ GitHub URL  | http://github.com/kazmiya/dokuwiki-plugin-asiansearch |+
  
-===== History =====+**Changelog**:
  
-  * 2009-09-06 -- Initial release+{{rss>https://github.com/kazmiya/dokuwiki-plugin-asiansearch/commits/master.atom 5 date 1d}}
  
 ===== Overview ===== ===== Overview =====
  
-DokuWiki has a full-text search function which now also supports Asian languages. However, searching Asian language texts still has some problems. The problems are that: +DokuWiki has a full-text search function which now also supports Asian languages. However, searching Asian language texts still has some problems.
- +
-  * Search result highlights are a bit too fragmented +
-  * An ideographic space (U+3000) in a search query is treated not as a search term separator, but as a character itself +
- +
-This plugin solves these problems by manipulating a search query, never making changes to your DokuWiki's search index files. +
- +
-===== Examples ===== +
- +
-Let's assume that your DokuWiki has a page whose text is: +
- +
-  京都から東海道新幹線で東に向かうと、東京に着いた。 +
- +
-==== Search Result Highlights ==== +
- +
-**Search Query:** ''[ 東京 ]'' +
- +
-^ ^ Search Result/Highlights  ^ Impressions +
-| Plain Dokuwiki | __**京**__都から__**東**__海道新幹線で__**東**__に向かうと、__**東京**__に着いた。 | Too fragmented. Noisy. | +
-| With this plugin | 京都から東海道新幹線で東に向かうと、__**東京**__に着いた。 | Good. | +
- +
-==== Ideographic Spaces ==== +
- +
-**Search Query:** ''[ 新幹線 東京 ]'' +
- +
-^ ^ Search Result/Highlights  ^ Impressions +
-| Plain DokuWiki | :!: No Hits!  | Why? | +
-| With this plugin | 京都から東海道__**新幹線**__で東に向かうと、__**東京**__に着いた。 | As I expected. | +
- +
-Note that the space between ''%%"新幹線"%%'' and ''%%"東京"%%'' is not a normal space but an ideographic space (U+3000). In a plain DokuWiki, the search query ''%%[ 新幹線 東京 ]%%'' is parsed as a monolithic ''%%"新幹線 東京"%%'', not as separated ''%%"新幹線"%%'' and ''%%"東京"%%''+
- +
-===== How It Works ===== +
- +
-This plugin manipulates a search query by using the following steps: +
- +
-  - Puts "phrases" aside not to make any changes within preexistent phrases +
-  - Replaces ideographic spaces with normal spaces +
-  - Makes a phrase for each successive Asian character +
- +
-Below is a example of complicated query. +
- +
-^ Original Query  | ''%%[ dokuwiki "asiansearch plugin" プラグイン 插件 플러그인 "検 索" ]%%''+
-^ Manipulated Query  | ''%%[ dokuwiki "asiansearch plugin" "プラグイン" "插件" "플러그인" "検 索" ]%%''+
- +
-You can see that Asian characters are quoted, ideographic spaces are replaced with normal spaces, and nothing is changed within preexistent phrases. +
- +
-By default, DokuWiki treats each Asian character as a "word", and additionally, each successive Asian character as a "phrase". DokuWiki highlights both "words" and "phrases" in search results. Preprocessing a search query in above way reduces "words", resulting in neat highlights of your search results.+
  
-By checking the returned values of ''[[xref>ft_queryParser]]'', you can see how DokuWiki parsed these queries.+The problems are that:
  
-**Original Query:**+  * **DokuWiki 2009-02-14*
 +    * Search result highlightings are a bit too fragmented 
 +    * An ideographic space (U+3000) in a search query is treated not as a search term separator, but as a character itself 
 +  * **DokuWiki 2010-11-07 "Anteater"** 
 +    * No search result snippet appears when searched with Asian words
  
-  'phrases': +This plugin solves these problems.
-    - 'asiansearch plugin+
-    - '検 索' +
-    - ' プラグイン 插件 플러그인' +
-  'words': +
-    - 'dokuwiki' +
-    - 'プ' +
-    - 'ラ' +
-    - 'グ' +
-    - 'イ' +
-    - 'ン' +
-    - '插' +
-    - '件' +
-    - '플' +
-    - '러' +
-    - '그' +
-    - '인'+
  
-**Manipulated Query:**+===== Configuration =====
  
-  'phrases': +There are no configuration options for this plugin.
-    - 'asiansearch plugin+
-    - 'プラグイン' +
-    - '插件' +
-    - '플러그인' +
-    - '検 索' +
-  'words': +
-    - 'dokuwiki'+
  
-===== Discussion =====+===== Feedback =====
  
 +Any feedback is welcome. Please use the [[https://github.com/kazmiya/dokuwiki-plugin-asiansearch/issues|Issue Tracker]] to send your feedback.
  
plugin/asiansearch.1252256312.txt.gz · Last modified: 2009-09-06 18:58 by kazmiya

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki