Re: ACFinder 120519test版
OhYeah!
投稿数: 983
オンライン
とりあえず、対症療法としては、検索語の前処理で「なす(露地栽培」なんかも含めて正規化してしまうという手もありますね。php だと、下記のようになります。「露地なす」のように「未成熟豆類」でも検索可能になります。この正規表現だと、極端に省略したばあいは、「未豆」「まめみ」なんかでも OK です。
ACFinder の前処理だと、置換文字列側の () を \ でエスケープしない方が良いのかな?
ACFinder の前処理だと、置換文字列側の () を \ でエスケープしない方が良いのかな?
$str = preg_replace('/([^\(]*)?\(?((露地|ろし)(栽培|さいはい)?)\)?(.*)?/', '\1\5\(ろしさいはい\)', $str);
$str = preg_replace('/([^\(]*)?\(?((施設|しせつ)(栽培|さいはい)?)\)?(.*)?/', '\1\5\(しせつさいはい\)', $str);
$str = preg_replace('/([^\(]*)?\(?((水耕|すいこう)(栽培|さいはい)?)\)?(.*)?/', '\1\5\(すいこうさいはい\)', $str);
$str = preg_replace('/(未|み)(成熟|せいじゅく)?(豆|まめ)(類|るい)?/', 'まめるい\(みせいじゅく\)', $str);
$str = preg_replace('/(豆|まめ)(類|るい)?\(?(未|み)(成熟|せいじゅく)?\)?/', 'まめるい\(みせいじゅく\)', $str);
投票数:0
平均点:0.00
投稿ツリー
-
ACFinder 120519test版
(kabe, 2012.05.19 22:32)
- Re: ACFinder 120519test版 (OhYeah!, 2012.05.20 16:09)
-
Re: ACFinder 120519test版
(kabe, 2012.05.21 20:29)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.21 23:29)
- Re: ACFinder 120519test版 (OhYeah!, 2012.05.28 18:00)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.21 23:29)
-
Re: ACFinder 120519test版
(kabe, 2012.05.21 20:59)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.24 13:21)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.24 15:25)
-
検索語の前処理
(OhYeah!, 2012.05.29 09:31)
- Re: 検索語の前処理 (OhYeah!, 2012.05.29 18:20)
-
検索語の前処理
(OhYeah!, 2012.05.29 09:31)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.28 14:32)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.28 16:21)
- Re: ACFinder 120519test版 (OhYeah!, 2012.05.28 23:28)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.28 16:21)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.24 15:25)
-
Re: ACFinder 120519test版
(OhYeah!, 2012.05.24 13:21)