hyperestraier: estcmd gather の-umオプションによるキーワード抽出
 2007.08.08

hyperestraierでインデクス構築時に,キーワード抽出を同時に行うには
% estcmd gather -um -kn 32 index /some/where
estcmd extkeys コマンドでは -um を付けるとmecabを利用したキーワード抽出が行われます.estcmd gatherでは -um を付けただけではキーワード抽出は行われません.エラー/警告も出ません. estcmd gather と同時に形態要素解析を使ったキーワード抽出を実行したい場合は 1) -kn オプションでキーワード数を指定する,かつ 2) -um オプションを付ける.この 1), 2)のオプションを同時に有効にしないと望んだ動作にはなりません. hyperestraier-1.4.10/estcmd.c の中のdoputdoc()中の当該部分抜粋
    if(g_kwordnum > 0){
      kwords = g_usemorph ? est_morph_etch_doc(doc, g_kwordnum) :
        est_db_etch_doc(NULL, doc, g_kwordnum);
      est_doc_set_keywords(doc, kwords);
      cbmapclose(kwords);
    }
g_kwordnum が -kn オプションで指定された数値です.-kn オプションを使わなかった場合の値は -1 です.g_usemorph は -um オプションをつけた場合は真になる値です.
カテゴリー:hyperestraier