|
From: <jgr...@us...> - 2003-04-15 21:20:23
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv4822/UI
Modified Files:
HTML.pm
Log Message:
Finished working on false positive/negative counting
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.129
retrieving revision 1.130
diff -C2 -d -r1.129 -r1.130
*** HTML.pm 15 Apr 2003 13:32:35 -0000 1.129
--- HTML.pm 15 Apr 2003 21:20:18 -0000 1.130
***************
*** 1503,1509 ****
for my $bucket ($self->{classifier__}->get_buckets()) {
$self->{classifier__}->set_bucket_parameter( $bucket, 'count', 0 );
}
$self->{classifier__}->write_parameters();
! $self->config_( 'last_reset', localtime );
$self->{configuration__}->save_configuration();
}
--- 1503,1512 ----
for my $bucket ($self->{classifier__}->get_buckets()) {
$self->{classifier__}->set_bucket_parameter( $bucket, 'count', 0 );
+ $self->{classifier__}->set_bucket_parameter( $bucket, 'fpcount', 0 );
+ $self->{classifier__}->set_bucket_parameter( $bucket, 'fncount', 0 );
}
$self->{classifier__}->write_parameters();
! my $lasttime = localtime;
! $self->config_( 'last_reset', $lasttime );
$self->{configuration__}->save_configuration();
}
***************
*** 2375,2392 ****
if ( !$reclassified ) {
$self->{classifier__}->add_message_to_bucket( $self->global_config_( 'msgdir' ) . $mail_file, $newbucket );
- $self->global_config_( 'ecount', $self->global_config_( 'ecount' ) + 1 ) if ( $newbucket ne $bucket );
$self->log_( "Reclassifying $mail_file from $bucket to $newbucket" );
if ( $bucket ne $newbucket ) {
! $self->{classifier__}->set_bucket_parameter( $newbucket, 'count',
! $self->{classifier__}->get_bucket_parameter( $newbucket, 'count' ) + 1 );
! $self->{classifier__}->set_bucket_parameter( $bucket, 'count',
! $self->{classifier__}->get_bucket_parameter( $bucket, 'count' ) - 1 );
! $self->{classifier__}->set_bucket_parameter( $newbucket, 'fncount',
! $self->{classifier__}->get_bucket_parameter( $newbucket, 'fncount' ) + 1 );
! $self->{classifier__}->set_bucket_parameter( $bucket, 'fpcount',
! $self->{classifier__}->get_bucket_parameter( $bucket, 'fpcount' ) + 1 );
}
--- 2378,2401 ----
if ( !$reclassified ) {
$self->{classifier__}->add_message_to_bucket( $self->global_config_( 'msgdir' ) . $mail_file, $newbucket );
$self->log_( "Reclassifying $mail_file from $bucket to $newbucket" );
if ( $bucket ne $newbucket ) {
! my $ecount = $self->global_config_( 'ecount' ) + 1;
! $self->global_config_( 'ecount', $ecount );
! my $count = $self->{classifier__}->get_bucket_parameter( $newbucket, 'count' );
! $self->{classifier__}->set_bucket_parameter( $newbucket, 'count', $count+1 );
!
! $count = $self->{classifier__}->get_bucket_parameter( $bucket, 'count' );
! $count -= 1;
! $count = 0 if ( $count < 0 ) ;
! $self->{classifier__}->set_bucket_parameter( $bucket, 'count', $count );
!
! my $fncount = $self->{classifier__}->get_bucket_parameter( $newbucket, 'fncount' );
! $self->{classifier__}->set_bucket_parameter( $newbucket, 'fncount', $fncount+1 );
!
! my $fpcount = $self->{classifier__}->get_bucket_parameter( $bucket, 'fpcount' );
! $self->{classifier__}->set_bucket_parameter( $bucket, 'fpcount', $fpcount+1 );
}
***************
*** 2438,2453 ****
if ( $bucket ne $usedtobe ) {
! $self->global_config_( 'ecount', $self->global_config_( 'ecount' ) - 1 ) if ( $self->global_config_( 'ecount' ) > 0 );
! $self->{classifier__}->set_bucket_parameter( $bucket, 'count',
! $self->{classifier__}->get_bucket_parameter( $bucket, 'count' ) - 1 );
! $self->{classifier__}->set_bucket_parameter( $usedtobe, 'count',
! $self->{classifier__}->get_bucket_parameter( $usedtobe, 'count' ) + 1 );
! $self->{classifier__}->set_bucket_parameter( $bucket, 'fncount',
! $self->{classifier__}->get_bucket_parameter( $bucket, 'fncount' ) - 1 );
! $self->{classifier__}->set_bucket_parameter( $usedtobe, 'fpcount',
! $self->{classifier__}->get_bucket_parameter( $usedtobe, 'fpcount' ) - 1 );
! }
# Since we have just changed the classification of this file and it has
--- 2447,2469 ----
if ( $bucket ne $usedtobe ) {
! my $ecount = $self->global_config_( 'ecount' ) - 1;
! $ecount = 0 if ( $ecount < 0 );
! $self->global_config_( 'ecount', $ecount );
! my $count = $self->{classifier__}->get_bucket_parameter( $bucket, 'count' ) - 1;
! $count = 0 if ( $count < 0 );
! $self->{classifier__}->set_bucket_parameter( $bucket, 'count', $count );
! $count = $self->{classifier__}->get_bucket_parameter( $usedtobe, 'count' ) + 1;
! $self->{classifier__}->set_bucket_parameter( $usedtobe, 'count', $count );
!
! my $fncount = $self->{classifier__}->get_bucket_parameter( $bucket, 'fncount' ) - 1;
! $fncount = 0 if ( $fncount < 0 );
! $self->{classifier__}->set_bucket_parameter( $bucket, 'fncount', $fncount );
!
! my $fpcount = $self->{classifier__}->get_bucket_parameter( $usedtobe, 'fpcount' ) - 1;
! $fpcount = 0 if ( $fpcount < 0 );
! $self->{classifier__}->set_bucket_parameter( $usedtobe, 'fpcount', $fpcount );
! }
# Since we have just changed the classification of this file and it has
***************
*** 2706,2710 ****
# they will come back in the right order
! foreach my $header (undef, 'from', 'subject', 'bucket') {
$body .= "<th class=\"historyLabel\" scope=\"col\">\n";
$body .= "<a href=\"/history?session=$self->{session_key__}&filter=$self->{form_}{filter}&setsort=" . ($self->{form_}{sort} eq "$header"?"-":"");
--- 2722,2726 ----
# they will come back in the right order
! foreach my $header ('', 'from', 'subject', 'bucket') {
$body .= "<th class=\"historyLabel\" scope=\"col\">\n";
$body .= "<a href=\"/history?session=$self->{session_key__}&filter=$self->{form_}{filter}&setsort=" . ($self->{form_}{sort} eq "$header"?"-":"");
|