This is an old revision of the document!
bayes.pl スクリプトは、スクリプトに渡されたメッセージのテキストについての単語マトリクスを見るためのものです。
このスクリプトは、POPFile がインストールされているディレクトリで実行しなければいけません。Windows ユーザは、DOS 窓を開いて、POPFile のディレクトリに移動します(通常は c:\program files\popfile\ ですが、システムによっては違う場所かもしれません。訳注:Mac OS X 用のインストールパッケージを使用している場合は、/Library/POPFile/ です)。
<code> cd "\program files\popfile\"
</code>
POPFile がインストールされているディレクトリに移動したら、下記のようにしてプログラムを動かします。
<code> perl bayes.pl 分析したいファイル
</code>
bayes.pl の出力はすぐに画面を越えてしまうので、more などのユーティリティにパイプしたり、テキストファイルに保存しておいてメモ帳などのテキストエディタで内容を確認することができます。
<code> perl bayes.pl 分析したいファイル | more
</code>
<code> perl bayes.pl 分析したいファイル > myreport.txt start myreport.txt
</code>
注意: 出力結果は量を減らすために加工されています。
perl bayes.pl testmsg.msg
下のような出力結果が表示されます。メッセージが分類されるバケツと、単語と単語の回数(メッセージの中で使われていた回数)が、コーパスに含まれている単語それぞれについて表示されます)。
testmsg.msg is 'normal' -000000 6 -666666 3 -999999 2 -bbddff 1 -cccccc 1 -eeeeee 3 -ffffff 6 127.0.0.1 1 66.35.250.131 2 absolute 1 access 8 add 2 added 2 administrator 2 advantage 1 allowing 2 allows 8 from:osdn.com 1 header:Content-Transfer-Encoding 1 header:Content-Type 1 header:Date 1 header:Errors-to 1 header:From 1 header:List-Archive 1 header:List-Help 1 header:List-Id 1 header:List-Owner 1 header:List-Post 1 header:List-Subscribe 1 header:List-Unsubscribe 1 header:Message-Id 1 header:Mime-version 1 header:Precedence 1 header:Received 5 header:Reply-To 1 header:Sender 1 header:Subject 1 header:To 1 header:X-Loop 1 header:X-Originating-IP 1 header:X-Sequence 1 header:X-no-archive 1 headers 1 hover 1 html:backcolor#999999 2 html:backcolor#BBDDFF 1 html:backcolor#CCCCCC 1 html:backcolor#FFFFFF 6 html:backcolor#eeeeee 3 html:comment 6 html:fontcolor#000000 6 html:fontcolor#666666 3 html:fontsize+0 1 html:fontsize+1 3 html:fontsize-1 2 html:fontsize-2 3 html:imgheight1 4 html:imgheight2 1 html:imgremotesrc 6 html:imgwidth1 4 html:imgwidth476 1 html:numericentity 4 html:td 16
Should you find anything in the documentation that is incomplete, unclear, outdated or just plain wrong, please let us know and leave a note in the Documentation Forum.