おのたく日記 YouTubeも始めました→
2005-03-24(Thu) [長年日記]
■ 「ベイジアンフィルタ for MovableType」PostgreSQL用のTable dumpが間違いPart2
3月16日の日記の「ベイジアンフィルタ for MovableType」を使ってみる。で見つけていた、PostgreSQL用のTable dump間違えが、まだまだ有った。
「うごいて無いじゃん!」ってかんじだったけど、ログを見ると
postgres[19939]: [2] ERROR: Relation "mt_bayesian" does not exist
postgres[19939]: [3] ERROR: Relation "mt_bayesianblog" does not exist
postgres[19939]: [4] ERROR: Relation "mt_bayesiantoken" does not exist
postgres[19939]: [52] ERROR: pg_aclcheck: class "mt_bayesian_id" not found
と出てきていたので、「なんでかなぁ」と調べたらbdb/bayesian_postgres.dumpのテーブル名やシーケンス名には、mt_が入ってない事に気づいたので、mt_を入れたbayesian-init-db.cgiに書き換えて、再度やりなおし。
ちなみなみに、このテーブルとシーケンスの設定を消すときのSQLは以下の通りなので、もし、リトライするときには、こちらを使う必要有り。
drop table mt_bayesian; drop table mt_bayesianblog;drop table mt_bayesiantoken; drop sequence mt_bayesian_id; drop sequence mt_bayesianblog_id; drop sequence mt_bayesiantoken_id;
■ 「ベイジアンフィルタ for MovableType」PostgreSQL用のTable dumpが間違いPart3
「ふっふっふ、今度こそ動くぞ」って思ったけど、今度はTRAINすると
postgres[829]: [22] ERROR: ExecAppend: Fail to add null value in not null attribute bayesian_created_on
とか出る。面倒なのでnot nullの制約を外してテーブルを作り直したら今度は
postgres[829]: [22] ERROR: ExecAppend: Fail to add null value in not null attribute bayesian_modify_on
と出るので、またまたnot nullの制約を外した。
そんな、こんなで、なんとかTRAINでスパムは100%,スパムで無いのは0%と学習できるようになった。やったね
と思ったけど、まだ「DELETE SPAM」ボタンでの一括削除はできないぞ?!?
|