From: Sam S. <ssc...@us...> - 2005-05-20 23:25:46
|
Update of /cvsroot/popfile/engine/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26452 Modified Files: HTML.pm Log Message: Back-out inadvertent commit of one of jelang's in-progress patches Index: HTML.pm =================================================================== RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v retrieving revision 1.349 retrieving revision 1.350 diff -C2 -d -r1.349 -r1.350 *** HTML.pm 20 May 2005 23:05:58 -0000 1.349 --- HTML.pm 20 May 2005 23:25:36 -0000 1.350 *************** *** 2235,2256 **** my @corpus_data; ! my $total_messages = $self->mcount__( $session ); ! if ( $total_messages != 0 ) { ! $templ->param( 'Corpus_If_Message_Count' => 1 ); ! } ! else { ! $templ->param( 'Corpus_If_Message_Count' => 0 ); ! } ! my $total_words = 0; ! for my $bucket (@buckets) { ! $total_words += $self->classifier_()->get_bucket_word_count( $session, $bucket ); ! } ! $templ->param( 'Corpus_Word_Count' => $self->pretty_number( $total_words ) ); ! if ( $total_words != 0 ) { ! $templ->param( 'Corpus_If_Word_Count' => 1 ); ! } ! else { ! $templ->param( 'Corpus_If_Word_Count' => 0 ); ! } foreach my $bucket ( @buckets ) { my %row_data; --- 2235,2239 ---- my @corpus_data; ! foreach my $bucket ( @buckets ) { my %row_data; *************** *** 2272,2318 **** $row_data{Localize_Apply} = $self->{language__}{Apply}; $row_data{Corpus_Loop_Loop_Colors} = \@color_data; - my $messages = $self->get_bucket_parameter__( $session, $bucket, 'count' ); - if ( $total_messages != 0 ) { - $row_data{Bucket_Message_Percent} = sprintf( "%.2f", ( 100 * ( $messages / $total_messages ) ) ); - } - else { - $row_data{Bucket_Message_Percent} = " "; - } - my $positives = $self->get_bucket_parameter__($session, $bucket, 'fpcount' ); - $row_data{Bucket_False_Positive} = $self->pretty_number( $positives ); - if ( ( $total_messages - $messages ) == 0 ) { - $row_data{Bucket_Strike_Rate} = "n/a"; - } - else { - $row_data{Bucket_Strike_Rate} = sprintf( "%.2f%%", ( 100 * ( $positives ) / ( $total_messages - $messages ) ) ); - } - my $negatives = $self->get_bucket_parameter__( $session, $bucket, 'fncount' ); - $row_data{Bucket_False_Negative} = $self->pretty_number( $negatives ); - if ( ( $messages + $negatives ) == 0 ) { - $row_data{Bucket_Hit_Rate} = "n/a"; - } - else { - $row_data{Bucket_Hit_Rate} = sprintf( "%.2f%%", ( 100 * ( $messages ) / ( $messages + $negatives ) ) ); - } - my $words = $self->classifier_()->get_bucket_word_count( $session, $bucket ); - $row_data{Bucket_Word_Count} = $self->pretty_number( $words ); - if ( $total_words != 0 ) { - $row_data{Bucket_Word_Percent} = sprintf( "%.2f", ( 100 * ( $words / $total_words ) ) ); - } - else { - $row_data{Bucket_Word_Percent} = " "; - } - if ( $messages != 0 ) { - $row_data{Bar_If_Message_Count} = 1; - } - else { - $row_data{Bar_If_Message_Count} = 0; - } - if ( $words != 0 ) { - $row_data{Bar_If_Word_Count} = 1; - } - else { - $row_data{Bar_If_Word_Count} = 0; - } push ( @corpus_data, \%row_data ); } --- 2255,2258 ---- |