Differences

This shows you the differences between the selected revision and the current version of the page.

searching_index_for_japanese 2010/01/15 00:34 searching_index_for_japanese 2020/02/06 11:04 current
Line 4: Line 4:
It is because that the latest version of PunBB does not create searching words (table:search_words) appropriately. It is because that the latest version of PunBB does not create searching words (table:search_words) appropriately.
-The searching words is split and created at search_idx.php, but no Japanese words is created because Japanese words is splitted by white-spaces. Therefore, splitting Japanese sentence into Japanese words is very difficult.+The searching words are split and created at search_idx.php, but no Japanese word is created. Because Japanese words in a sentence is not split by whitespaces or other chars. In order to split appropriate words, we need some large Japanese dictionary and a specific analytical program. It's not small work.
====== How to solve====== ====== How to solve======
Line 21: Line 21:
// Split Japanese words by using Yahoo Web API if there are Japanese chars. // Split Japanese words by using Yahoo Web API if there are Japanese chars.
$text = split_japanese_words($text); $text = split_japanese_words($text);
 +</code>
 +
 +
 +One character of Japanese Kanji may be meaningful. So change FORUM_SEARCH_MIN_WORD to 1 at line 20 in search_idx.php
 +<code php>
 +if (!defined('FORUM_SEARCH_MIN_WORD'))
 + define('FORUM_SEARCH_MIN_WORD', 1);
</code> </code>
Line 33: Line 40:
<code php> <code php>
if (!defined('YAHOO_API_CODE')) if (!defined('YAHOO_API_CODE'))
-  define('YAHOO_API_CODE','_F3TRHexg64WGN7BkqBt03OePtRKDon8qrFE6wWnEY.R7OWqPXVkHxJsTokT_Ijfa5w-');+  define('YAHOO_API_CODE','_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-');
   
/* /*
Line 76: Line 83:
===== Modification of SQL ===== ===== Modification of SQL =====
See also this post in the forum. See also this post in the forum.
-  *http://punbb.informer.com/forums/post/119577/+  *https://punbb.informer.com/forums/post/119577/

Personal Tools