You can subscribe to this list here.
2003 |
Jan
|
Feb
(160) |
Mar
(119) |
Apr
(111) |
May
(118) |
Jun
(101) |
Jul
(304) |
Aug
(113) |
Sep
(140) |
Oct
(137) |
Nov
(87) |
Dec
(122) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(78) |
Feb
(125) |
Mar
(131) |
Apr
(59) |
May
(121) |
Jun
(166) |
Jul
(150) |
Aug
(137) |
Sep
(73) |
Oct
(58) |
Nov
(27) |
Dec
(60) |
2005 |
Jan
(131) |
Feb
(84) |
Mar
(36) |
Apr
(8) |
May
(28) |
Jun
(20) |
Jul
(10) |
Aug
(72) |
Sep
(76) |
Oct
(34) |
Nov
(3) |
Dec
(29) |
2006 |
Jan
(13) |
Feb
(92) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(17) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(12) |
2007 |
Jan
(28) |
Feb
(15) |
Mar
|
Apr
|
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(8) |
Sep
(20) |
Oct
(38) |
Nov
(65) |
Dec
(92) |
2008 |
Jan
(21) |
Feb
(56) |
Mar
(27) |
Apr
(174) |
May
(25) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <jgr...@us...> - 2003-03-05 21:37:01
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1:/tmp/cvs-serv729/Proxy Modified Files: POP3.pm Log Message: Completed working of the security page Index: POP3.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** POP3.pm 5 Mar 2003 21:15:35 -0000 1.45 --- POP3.pm 5 Mar 2003 21:36:57 -0000 1.46 *************** *** 57,62 **** # There is no default setting for the secure server ! $self->config_( 'server', '' ); ! $self->config_( 'sport', 110 ); # The default timeout in seconds for POP3 commands --- 57,62 ---- # There is no default setting for the secure server ! $self->config_( 'secure_server', '' ); ! $self->config_( 'secure_port', 110 ); # The default timeout in seconds for POP3 commands *************** *** 213,218 **** # Secure authentication if ( $command =~ /AUTH ([^ ]+)/ ) { ! if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { # Loop until we get -ERR or +OK my $response; --- 213,218 ---- # Secure authentication if ( $command =~ /AUTH ([^ ]+)/ ) { ! if ( $self->config_( 'secure_server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'secure_server' ), $self->config_( 'secure_port' ) ) ) { # Loop until we get -ERR or +OK my $response; *************** *** 243,248 **** if ( $command =~ /AUTH/ ) { ! if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { if ( $self->echo_response_($mail, $client, "AUTH" ) ) { $self->echo_to_dot_( $mail, $client ); --- 243,248 ---- if ( $command =~ /AUTH/ ) { ! if ( $self->config_( 'secure_server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'secure_server' ), $self->config_( 'secure_port' ) ) ) { if ( $self->echo_response_($mail, $client, "AUTH" ) ) { $self->echo_to_dot_( $mail, $client ); *************** *** 327,332 **** # The CAPA command if ( $command =~ /CAPA/i ) { ! if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { $self->echo_to_dot_( $mail, $client ) if ( $self->echo_response_($mail, $client, "CAPA" ) ); } else { --- 327,332 ---- # The CAPA command if ( $command =~ /CAPA/i ) { ! if ( $self->config_( 'secure_server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'secure_server' ), $self->config_( 'secure_port' ) ) ) { $self->echo_to_dot_( $mail, $client ) if ( $self->echo_response_($mail, $client, "CAPA" ) ); } else { |
From: <jgr...@us...> - 2003-03-05 21:21:45
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1:/tmp/cvs-serv25996/POPFile Modified Files: Logger.pm Log Message: Made the log output a little simpler Index: Logger.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Logger.pm 5 Mar 2003 21:15:34 -0000 1.12 --- Logger.pm 5 Mar 2003 21:21:40 -0000 1.13 *************** *** 140,145 **** $message .= "\n"; ! my $now = localtime; ! my $msg = "$now ($$): $message"; if ( $self->global_config_( 'debug' ) & 1 ) { --- 140,146 ---- $message .= "\n"; ! my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime; ! $year += 1900; ! my $msg = "$year/$mon/$mday $hour:$min:$sec $$: $message"; if ( $self->global_config_( 'debug' ) & 1 ) { |
From: <jgr...@us...> - 2003-03-05 21:16:25
|
Update of /cvsroot/popfile/engine/UI In directory sc8-pr-cvs1:/tmp/cvs-serv23158/UI Modified Files: HTML.pm Log Message: Statistics and reclassification now work; all configuration parameters now fixed correctly and configuration screens work; history now updates; can look up words; TODO: magnets not working and security page partly broken, need to decide whether to drop stop words or not Index: HTML.pm =================================================================== RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** HTML.pm 5 Mar 2003 20:06:18 -0000 1.105 --- HTML.pm 5 Mar 2003 21:15:37 -0000 1.106 *************** *** 592,597 **** my $result = "<table class=\"footer\" summary=\"\">\n<tr>\n"; $result .= "<td class=\"footerBody\">\n"; ! $result .= "POPFile $self->{configuration}{major_version}.$self->{configuration}{minor_version}."; ! $result .= "$self->{configuration}{build_version} - \n"; $result .= "<a class=\"bottomLink\" href=\""; --- 592,597 ---- my $result = "<table class=\"footer\" summary=\"\">\n<tr>\n"; $result .= "<td class=\"footerBody\">\n"; ! $result .= "POPFile X.X."; ! $result .= "X - \n"; $result .= "<a class=\"bottomLink\" href=\""; *************** *** 700,707 **** $self->config_( 'skin', $self->{form__}{skin} ) if ( defined($self->{form__}{skin}) ); ! $self->config_( 'debug', $self->{form__}{debug}-1 ) if ( ( defined($self->{form__}{debug}) ) && ( ( $self->{form__}{debug} >= 1 ) && ( $self->{form__}{debug} <= 4 ) ) ); ! $self->config_( 'subject', $self->{form__}{subject}-1 ) if ( ( defined($self->{form__}{subject}) ) && ( ( $self->{form__}{subject} >= 1 ) && ( $self->{form__}{subject} <= 2 ) ) ); ! $self->config_( 'xtc', $self->{form__}{xtc}-1 ) if ( ( defined($self->{form__}{xtc}) ) && ( ( $self->{form__}{xtc} >= 1 ) && ( $self->{form__}{xtc} <= 2 ) ) ); ! $self->config_( 'xpl', $self->{form__}{xpl}-1 ) if ( ( defined($self->{form__}{xpl}) ) && ( ( $self->{form__}{xpl} >= 1 ) && ( $self->{form__}{xpl} <= 2 ) ) ); if ( defined($self->{form__}{language}) ) { --- 700,707 ---- $self->config_( 'skin', $self->{form__}{skin} ) if ( defined($self->{form__}{skin}) ); ! $self->global_config_( 'debug', $self->{form__}{debug}-1 ) if ( ( defined($self->{form__}{debug}) ) && ( ( $self->{form__}{debug} >= 1 ) && ( $self->{form__}{debug} <= 4 ) ) ); ! $self->global_config_( 'subject', $self->{form__}{subject}-1 ) if ( ( defined($self->{form__}{subject}) ) && ( ( $self->{form__}{subject} >= 1 ) && ( $self->{form__}{subject} <= 2 ) ) ); ! $self->global_config_( 'xtc', $self->{form__}{xtc}-1 ) if ( ( defined($self->{form__}{xtc}) ) && ( ( $self->{form__}{xtc} >= 1 ) && ( $self->{form__}{xtc} <= 2 ) ) ); ! $self->global_config_( 'xpl', $self->{form__}{xpl}-1 ) if ( ( defined($self->{form__}{xpl}) ) && ( ( $self->{form__}{xpl} >= 1 ) && ( $self->{form__}{xpl} <= 2 ) ) ); if ( defined($self->{form__}{language}) ) { *************** *** 714,718 **** if ( defined($self->{form__}{separator}) ) { if ( length($self->{form__}{separator}) == 1 ) { ! $self->config_( 'separator', $self->{form__}{separator} ); } else { $separator_error = "<blockquote>\n<div class=\"error01\">\n"; --- 714,718 ---- if ( defined($self->{form__}{separator}) ) { if ( length($self->{form__}{separator}) == 1 ) { ! $self->module_config_( 'pop3', 'separator', $self->{form__}{separator} ); } else { $separator_error = "<blockquote>\n<div class=\"error01\">\n"; *************** *** 734,738 **** if ( defined($self->{form__}{port}) ) { if ( ( $self->{form__}{port} >= 1 ) && ( $self->{form__}{port} < 65536 ) ) { ! $self->config_( 'port', $self->{form__}{port} ); } else { $port_error = "<blockquote><div class=\"error01\">$self->{language__}{Configuration_Error3}</div></blockquote>"; --- 734,738 ---- if ( defined($self->{form__}{port}) ) { if ( ( $self->{form__}{port} >= 1 ) && ( $self->{form__}{port} < 65536 ) ) { ! $self->module_config_( 'pop3', 'port', $self->{form__}{port} ); } else { $port_error = "<blockquote><div class=\"error01\">$self->{language__}{Configuration_Error3}</div></blockquote>"; *************** *** 761,765 **** if ( defined($self->{form__}{timeout}) ) { if ( ( $self->{form__}{timeout} >= 10 ) && ( $self->{form__}{timeout} <= 300 ) ) { ! $self->config_( 'timeout', $self->{form__}{timeout} ); } else { $timeout_error = "<blockquote><div class=\"error01\">$self->{language__}{Configuration_Error6}</div></blockquote>"; --- 761,765 ---- if ( defined($self->{form__}{timeout}) ) { if ( ( $self->{form__}{timeout} >= 10 ) && ( $self->{form__}{timeout} <= 300 ) ) { ! $self->global_config_( 'timeout', $self->{form__}{timeout} ); } else { $timeout_error = "<blockquote><div class=\"error01\">$self->{language__}{Configuration_Error6}</div></blockquote>"; *************** *** 857,861 **** $body .= "<table width=\"100%\" summary=\"$self->{language__}{Configuration_InsertionTableSummary}\">\n<tr>\n"; $body .= "<th valign=\"baseline\" scope=\"row\">\n<span class=\"configurationLabel\">$self->{language__}{Configuration_SubjectLine}:</span>\n</th>\n"; ! if ( $self->config_( 'subject' ) == 1 ) { $body .= "<td valign=\"baseline\" align=\"right\">\n"; $body .= "<form class=\"configSwitch\" style=\"margin: 0\" action=\"/configuration\">\n"; --- 857,861 ---- $body .= "<table width=\"100%\" summary=\"$self->{language__}{Configuration_InsertionTableSummary}\">\n<tr>\n"; $body .= "<th valign=\"baseline\" scope=\"row\">\n<span class=\"configurationLabel\">$self->{language__}{Configuration_SubjectLine}:</span>\n</th>\n"; ! if ( $self->global_config_( 'subject' ) == 1 ) { $body .= "<td valign=\"baseline\" align=\"right\">\n"; $body .= "<form class=\"configSwitch\" style=\"margin: 0\" action=\"/configuration\">\n"; *************** *** 875,879 **** # X-Text-Classification insertion widget $body .= "</tr>\n<tr>\n<th valign=\"baseline\" scope=\"row\">\n<span class=\"configurationLabel\">$self->{language__}{Configuration_XTCInsertion}:</span></th>\n"; ! if ( $self->config_( 'xtc' ) == 1 ) { $body .= "<td valign=\"baseline\" align=\"right\">\n"; $body .= "<form class=\"configSwitch\" style=\"margin: 0\" action=\"/configuration\">\n"; --- 875,879 ---- # X-Text-Classification insertion widget $body .= "</tr>\n<tr>\n<th valign=\"baseline\" scope=\"row\">\n<span class=\"configurationLabel\">$self->{language__}{Configuration_XTCInsertion}:</span></th>\n"; ! if ( $self->global_config_( 'xtc' ) == 1 ) { $body .= "<td valign=\"baseline\" align=\"right\">\n"; $body .= "<form class=\"configSwitch\" style=\"margin: 0\" action=\"/configuration\">\n"; *************** *** 893,897 **** # X-POPFile-Link insertion widget $body .= "</tr>\n<tr>\n<th valign=\"baseline\" scope=\"row\">\n<span class=\"configurationLabel\">$self->{language__}{Configuration_XPLInsertion}:</span></th>\n"; ! if ( $self->config_( 'xpl' ) == 1 ) { $body .= "<td valign=\"baseline\" align=\"right\">\n"; $body .= "<form class=\"configSwitch\" style=\"margin: 0\" action=\"/configuration\">\n"; --- 893,897 ---- # X-POPFile-Link insertion widget $body .= "</tr>\n<tr>\n<th valign=\"baseline\" scope=\"row\">\n<span class=\"configurationLabel\">$self->{language__}{Configuration_XPLInsertion}:</span></th>\n"; ! if ( $self->global_config_( 'xpl' ) == 1 ) { $body .= "<td valign=\"baseline\" align=\"right\">\n"; $body .= "<form class=\"configSwitch\" style=\"margin: 0\" action=\"/configuration\">\n"; *************** *** 917,932 **** $body .= "<form action=\"/configuration\">\n"; $body .= "<label class=\"configurationLabel\" for=\"configPopPort\">$self->{language__}{Configuration_POP3Port}:</label><br />\n"; ! $body .= "<input name=\"port\" type=\"text\" id=\"configPopPort\" value=\"" . $self->config_( 'port' ) . "\" />\n"; $body .= "<input type=\"submit\" class=\"submit\" name=\"update_port\" value=\"$self->{language__}{Apply}\" />\n"; $body .= "<input type=\"hidden\" name=\"session\" value=\"$self->{session_key__}\" />\n</form>\n$port_error\n"; ! $body .= sprintf( $self->{language__}{Configuration_POP3Update}, $self->config_( 'port' ) ) if ( defined($self->{form__}{port}) ); # Separator Character widget $body .= "\n<form action=\"/configuration\">\n"; $body .= "<label class=\"configurationLabel\" for=\"configSeparator\">$self->{language__}{Configuration_Separator}:</label><br />\n"; ! $body .= "<input name=\"separator\" id=\"configSeparator\" type=\"text\" value=\"" . $self->config_( 'separator' ) . "\" />\n"; $body .= "<input type=\"submit\" class=\"submit\" name=\"update_separator\" value=\"$self->{language__}{Apply}\" />\n"; $body .= "<input type=\"hidden\" name=\"session\" value=\"$self->{session_key__}\" />\n</form>\n$separator_error\n"; ! $body .= sprintf( $self->{language__}{Configuration_SepUpdate}, $self->config_( 'separator' ) ) if ( defined($self->{form__}{separator}) ); # User Interface Port widget --- 917,932 ---- $body .= "<form action=\"/configuration\">\n"; $body .= "<label class=\"configurationLabel\" for=\"configPopPort\">$self->{language__}{Configuration_POP3Port}:</label><br />\n"; ! $body .= "<input name=\"port\" type=\"text\" id=\"configPopPort\" value=\"" . $self->module_config_( 'pop3', 'port' ) . "\" />\n"; $body .= "<input type=\"submit\" class=\"submit\" name=\"update_port\" value=\"$self->{language__}{Apply}\" />\n"; $body .= "<input type=\"hidden\" name=\"session\" value=\"$self->{session_key__}\" />\n</form>\n$port_error\n"; ! $body .= sprintf( $self->{language__}{Configuration_POP3Update}, $self->module_config_( 'pop3', 'port' ) ) if ( defined($self->{form__}{port}) ); # Separator Character widget $body .= "\n<form action=\"/configuration\">\n"; $body .= "<label class=\"configurationLabel\" for=\"configSeparator\">$self->{language__}{Configuration_Separator}:</label><br />\n"; ! $body .= "<input name=\"separator\" id=\"configSeparator\" type=\"text\" value=\"" . $self->module_config_( 'pop3', 'separator' ) . "\" />\n"; $body .= "<input type=\"submit\" class=\"submit\" name=\"update_separator\" value=\"$self->{language__}{Apply}\" />\n"; $body .= "<input type=\"hidden\" name=\"session\" value=\"$self->{session_key__}\" />\n</form>\n$separator_error\n"; ! $body .= sprintf( $self->{language__}{Configuration_SepUpdate}, $self->module_config_( 'pop3', 'separator' ) ) if ( defined($self->{form__}{separator}) ); # User Interface Port widget *************** *** 946,953 **** $body .= "<form action=\"/configuration\">\n"; $body .= "<label class=\"configurationLabel\" for=\"configTCPTimeout\">$self->{language__}{Configuration_TCPTimeoutSecs}:</label><br />\n"; ! $body .= "<input name=\"timeout\" type=\"text\" id=\"configTCPTimeout\" value=\"" . $self->config_( 'timeout' ) . "\" />\n"; $body .= "<input type=\"submit\" class=\"submit\" name=\"update_timeout\" value=\"$self->{language__}{Apply}\" />\n"; $body .= "<input type=\"hidden\" name=\"session\" value=\"$self->{session_key__}\" />\n</form>\n$timeout_error"; ! $body .= sprintf( $self->{language__}{Configuration_TCPTimeoutUpdate}, $self->config_( 'timeout' ) ) if ( defined($self->{form__}{timeout}) ); $body .= "</td>\n"; --- 946,953 ---- $body .= "<form action=\"/configuration\">\n"; $body .= "<label class=\"configurationLabel\" for=\"configTCPTimeout\">$self->{language__}{Configuration_TCPTimeoutSecs}:</label><br />\n"; ! $body .= "<input name=\"timeout\" type=\"text\" id=\"configTCPTimeout\" value=\"" . $self->global_config_( 'timeout' ) . "\" />\n"; $body .= "<input type=\"submit\" class=\"submit\" name=\"update_timeout\" value=\"$self->{language__}{Apply}\" />\n"; $body .= "<input type=\"hidden\" name=\"session\" value=\"$self->{session_key__}\" />\n</form>\n$timeout_error"; ! $body .= sprintf( $self->{language__}{Configuration_TCPTimeoutUpdate}, $self->global_config_( 'timeout' ) ) if ( defined($self->{form__}{timeout}) ); $body .= "</td>\n"; *************** *** 960,973 **** $body .= "<select name=\"debug\" id=\"configLogging\">\n"; $body .= "<option value=\"1\""; ! $body .= " selected=\"selected\"" if ( $self->config_( 'debug' ) == 0 ); $body .= ">$self->{language__}{Configuration_None}</option>\n"; $body .= "<option value=\"2\""; ! $body .= " selected=\"selected\"" if ( $self->config_( 'debug' ) == 1 ); $body .= ">$self->{language__}{Configuration_ToFile}</option>\n"; $body .= "<option value=\"3\""; ! $body .= " selected=\"selected\"" if ( $self->config_( 'debug' ) == 2 ); $body .= ">$self->{language__}{Configuration_ToScreen}</option>\n"; $body .= "<option value=\"4\""; ! $body .= " selected=\"selected\"" if ( $self->config_( 'debug' ) == 3 ); $body .= ">$self->{language__}{Configuration_ToScreenFile}</option>\n"; $body .= "</select>\n<input type=\"submit\" class=\"submit\" name=\"submit_debug\" value=\"$self->{language__}{Apply}\" />\n"; --- 960,973 ---- $body .= "<select name=\"debug\" id=\"configLogging\">\n"; $body .= "<option value=\"1\""; ! $body .= " selected=\"selected\"" if ( $self->global_config_( 'debug' ) == 0 ); $body .= ">$self->{language__}{Configuration_None}</option>\n"; $body .= "<option value=\"2\""; ! $body .= " selected=\"selected\"" if ( $self->global_config_( 'debug' ) == 1 ); $body .= ">$self->{language__}{Configuration_ToFile}</option>\n"; $body .= "<option value=\"3\""; ! $body .= " selected=\"selected\"" if ( $self->global_config_( 'debug' ) == 2 ); $body .= ">$self->{language__}{Configuration_ToScreen}</option>\n"; $body .= "<option value=\"4\""; ! $body .= " selected=\"selected\"" if ( $self->global_config_( 'debug' ) == 3 ); $body .= ">$self->{language__}{Configuration_ToScreenFile}</option>\n"; $body .= "</select>\n<input type=\"submit\" class=\"submit\" name=\"submit_debug\" value=\"$self->{language__}{Apply}\" />\n"; *************** *** 1317,1321 **** if ( ( defined($self->{form__}{type}) ) && ( $self->{form__}{bucket} ne '' ) && ( $self->{form__}{text} ne '' ) ) { my $found = 0; ! for my $bucket (keys %{$self->{classifier__}->{magnets}}) { if ( defined($self->{classifier__}->{magnets}{$bucket}{$self->{form__}{type}}{$self->{form__}{text}}) ) { $found = 1; --- 1317,1321 ---- if ( ( defined($self->{form__}{type}) ) && ( $self->{form__}{bucket} ne '' ) && ( $self->{form__}{text} ne '' ) ) { my $found = 0; ! for my $bucket ($self->{classifier__}->get_buckets_with_magnets()) { if ( defined($self->{classifier__}->{magnets}{$bucket}{$self->{form__}{type}}{$self->{form__}{text}}) ) { $found = 1; *************** *** 1588,1592 **** $self->{classifier__}->write_parameters(); $self->config_( 'last_reset', localtime ); ! $self->{configuration}->save_configuration(); } --- 1588,1592 ---- $self->{classifier__}->write_parameters(); $self->config_( 'last_reset', localtime ); ! $self->{configuration__}->save_configuration(); } *************** *** 1682,1686 **** $body .= "<td align=\"right\">$unique</td><td width=\"1%\"> </td>"; ! if ( $self->config_( 'subject' ) == 1 ) { # Subject Modification on/off widget --- 1682,1686 ---- $body .= "<td align=\"right\">$unique</td><td width=\"1%\"> </td>"; ! if ( $self->global_config_( 'subject' ) == 1 ) { # Subject Modification on/off widget *************** *** 1730,1735 **** my $color = $self->{classifier__}->get_bucket_color($bucket); $body .= "<td bgcolor=\"$color\">\n<img class=\"colorChooserImg\" border=\"0\" alt='" . sprintf( $self->{language__}{Bucket_CurrentColor}, $bucket, $color ) . "' src=\"pix.gif\" width=\"10\" height=\"20\" /></td>\n<td> </td>\n"; ! for my $i ( 0 .. $#{$self->{classifier__}->{possible_colors}} ) { ! my $color = $self->{classifier__}->{possible_colors}[$i]; if ( $color ne $self->{classifier__}->get_bucket_color($bucket) ) { $body .= "<td bgcolor=\"$color\" title=\"". sprintf( $self->{language__}{Bucket_SetColorTo}, $bucket, $color ) . "\">\n"; --- 1730,1735 ---- my $color = $self->{classifier__}->get_bucket_color($bucket); $body .= "<td bgcolor=\"$color\">\n<img class=\"colorChooserImg\" border=\"0\" alt='" . sprintf( $self->{language__}{Bucket_CurrentColor}, $bucket, $color ) . "' src=\"pix.gif\" width=\"10\" height=\"20\" /></td>\n<td> </td>\n"; ! for my $i ( 0 .. $#{$self->{classifier__}->{possible_colors__}} ) { ! my $color = $self->{classifier__}->{possible_colors__}[$i]; if ( $color ne $self->{classifier__}->get_bucket_color($bucket) ) { $body .= "<td bgcolor=\"$color\" title=\"". sprintf( $self->{language__}{Bucket_SetColorTo}, $bucket, $color ) . "\">\n"; *************** *** 1751,1755 **** my $accuracy = $self->{language__}{Bucket_NotEnoughData}; my $percent = 0; ! if ( $self->config_( 'mcount' ) > 0 ) { $percent = int( 10000 * ( $self->global_config_( 'mcount' ) - $self->global_config_( 'ecount' ) ) / $self->global_config_( 'mcount' ) ) / 100; $accuracy = "$percent%"; --- 1751,1755 ---- my $accuracy = $self->{language__}{Bucket_NotEnoughData}; my $percent = 0; ! if ( $self->global_config_( 'mcount' ) > 0 ) { $percent = int( 10000 * ( $self->global_config_( 'mcount' ) - $self->global_config_( 'ecount' ) ) / $self->global_config_( 'mcount' ) ) / 100; $accuracy = "$percent%"; *************** *** 1909,1913 **** if ( ( defined($self->{form__}{lookup}) ) || ( defined($self->{form__}{word}) ) ) { ! my $word = $self->{classifier__}->{mangler}->mangle($self->{form__}{word}, 1); $body .= "<blockquote>\n"; --- 1909,1913 ---- if ( ( defined($self->{form__}{lookup}) ) || ( defined($self->{form__}{word}) ) ) { ! my $word = $self->{classifier__}->{mangler__}->mangle($self->{form__}{word}, 1); $body .= "<blockquote>\n"; *************** *** 1929,1934 **** my $total = 0; foreach my $bucket (@buckets) { ! if ( $self->{classifier__}->get_value( $bucket, $word ) != 0 ) { ! my $prob = exp( $self->{classifier__}->get_value( $bucket, $word ) ); $total += $prob; if ( $max_bucket eq '' ) { --- 1929,1934 ---- my $total = 0; foreach my $bucket (@buckets) { ! if ( $self->{classifier__}->get_value_( $bucket, $word ) != 0 ) { ! my $prob = exp( $self->{classifier__}->get_value_( $bucket, $word ) ); $total += $prob; if ( $max_bucket eq '' ) { *************** *** 1950,1955 **** foreach my $bucket (@buckets) { ! if ( $self->{classifier__}->get_value( $bucket, $word ) != 0 ) { ! my $prob = exp( $self->{classifier__}->get_value( $bucket, $word ) ); my $n = ($total > 0)?$prob / $total:0; my $score = ($#buckets >= 0)?log($n)/log(@buckets)+1:0; --- 1950,1955 ---- foreach my $bucket (@buckets) { ! if ( $self->{classifier__}->get_value_( $bucket, $word ) != 0 ) { ! my $prob = exp( $self->{classifier__}->get_value_( $bucket, $word ) ); my $n = ($total > 0)?$prob / $total:0; my $score = ($#buckets >= 0)?log($n)/log(@buckets)+1:0; *************** *** 2434,2441 **** $self->global_config_( 'ecount', $self->global_config_( 'ecount' ) + 1 ) if ( $newbucket ne $bucket ); ! $self->{logger}->debug( "Reclassifying $mail_file from $bucket to $newbucket" ); ! # TODO $self->{classifier__}->set_parameters( $newbucket, count} += 1; ! # TODO $self->{classifier__}->{parameters}{$bucket}{count} -= 1; # Update the class file --- 2434,2443 ---- $self->global_config_( 'ecount', $self->global_config_( 'ecount' ) + 1 ) if ( $newbucket ne $bucket ); ! $self->log_( "Reclassifying $mail_file from $bucket to $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 ); # Update the class file *************** *** 2452,2458 **** # Add message feedback ! $self->{feedback}{$mail_file} = sprintf( $self->{language__}{History_ChangedTo}, $self->{classifier__}->get_bucket_color($newbucket), $newbucket ) ! # TODO $self->{configuration}->save_configuration(); } } --- 2454,2460 ---- # Add message feedback ! $self->{feedback}{$mail_file} = sprintf( $self->{language__}{History_ChangedTo}, $self->{classifier__}->get_bucket_color($newbucket), $newbucket ); ! $self->{configuration__}->save_configuration(); } } *************** *** 2481,2485 **** if ( defined( $usedtobe ) ) { ! $self->{classifier__}->remove_message_from_bucket($self->global_config_( 'msgdir' ) . $mail_file); $self->log_( "Undoing $mail_file from $bucket to $usedtobe" ); --- 2483,2487 ---- if ( defined( $usedtobe ) ) { ! $self->{classifier__}->remove_message_from_bucket($self->global_config_( 'msgdir' ) . $mail_file, $bucket); $self->log_( "Undoing $mail_file from $bucket to $usedtobe" ); *************** *** 2487,2492 **** if ( $bucket ne $usedtobe ) { $self->global_config_( 'ecount', $self->global_config_( 'ecount' ) - 1 ) if ( $self->global_config_( 'ecount' ) > 0 ); ! # TODO $self->{classifier__}->{parameters}{$bucket}{count} -= 1; ! # TODO $self->{classifier__}->{parameters}{$usedtobe}{count} += 1; } --- 2489,2497 ---- 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 ); } *************** *** 2505,2508 **** --- 2510,2515 ---- $self->{feedback}{$mail_file} = sprintf( $self->{language__}{History_ChangedTo}, ($self->{classifier__}->get_bucket_color($usedtobe) || ''), $usedtobe ); + + $self->{configuration__}->save_configuration(); } } |
From: <jgr...@us...> - 2003-03-05 21:16:14
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1:/tmp/cvs-serv23158/POPFile Modified Files: Configuration.pm Logger.pm Module.pm Log Message: Statistics and reclassification now work; all configuration parameters now fixed correctly and configuration screens work; history now updates; can look up words; TODO: magnets not working and security page partly broken, need to decide whether to drop stop words or not Index: Configuration.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Configuration.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Configuration.pm 3 Mar 2003 22:01:32 -0000 1.9 --- Configuration.pm 5 Mar 2003 21:15:33 -0000 1.10 *************** *** 176,180 **** if ( open CONFIG, ">popfile.cfg" ) { ! foreach my $key (keys %{$self->{configuration_parameters__}}) { print CONFIG "$key $self->{configuration_parameters__}{$key}\n"; } --- 176,180 ---- if ( open CONFIG, ">popfile.cfg" ) { ! foreach my $key (sort keys %{$self->{configuration_parameters__}}) { print CONFIG "$key $self->{configuration_parameters__}{$key}\n"; } Index: Logger.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Logger.pm 4 Mar 2003 15:49:24 -0000 1.11 --- Logger.pm 5 Mar 2003 21:15:34 -0000 1.12 *************** *** 54,58 **** # Start with debugging to file ! $self->config_( 'debug', 1 ); # The default location for log files --- 54,58 ---- # Start with debugging to file ! $self->global_config_( 'debug', 1 ); # The default location for log files *************** *** 133,137 **** my ( $self, $message ) = @_; ! if ( $self->config_( 'debug' ) > 0 ) { # Check to see if we are handling the USER/PASS command and if we are then obscure the # account information --- 133,137 ---- my ( $self, $message ) = @_; ! if ( $self->global_config_( 'debug' ) > 0 ) { # Check to see if we are handling the USER/PASS command and if we are then obscure the # account information *************** *** 143,147 **** my $msg = "$now ($$): $message"; ! if ( $self->config_( 'debug' ) & 1 ) { open DEBUG, ">>$self->{debug_filename__}"; binmode DEBUG; --- 143,147 ---- my $msg = "$now ($$): $message"; ! if ( $self->global_config_( 'debug' ) & 1 ) { open DEBUG, ">>$self->{debug_filename__}"; binmode DEBUG; *************** *** 150,154 **** } ! print $msg if ( $self->config_( 'debug' ) & 2 ); } } --- 150,154 ---- } ! print $msg if ( $self->global_config_( 'debug' ) & 2 ); } } Index: Module.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Module.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Module.pm 3 Mar 2003 23:14:43 -0000 1.4 --- Module.pm 5 Mar 2003 21:15:35 -0000 1.5 *************** *** 244,248 **** my ( $self, $name, $value ) = @_; ! return $self->{configuration__}->parameter( $self->{name__} . '_' . $name, $value ); } --- 244,248 ---- my ( $self, $name, $value ) = @_; ! return $self->module_config_( $self->{name__}, $name, $value ); } *************** *** 264,268 **** my ( $self, $name, $value ) = @_; ! return $self->{configuration__}->parameter( "GLOBAL_$name", $value ); } --- 264,289 ---- my ( $self, $name, $value ) = @_; ! return $self->module_config_( 'GLOBAL', $name, $value ); ! } ! ! # --------------------------------------------------------------------------------------------- ! # ! # module_config_ ! # ! # Called by a subclass to get or set a module specific configuration parameter ! # ! # $module The name of the module that owns the parameter (e.g. 'pop3') ! # $name The name of the parameter (e.g. 'port') ! # $value (optional) The value to set ! # ! # If called with just a $module and $name then module_config_() will return the current value ! # of the configuration parameter. ! # ! # --------------------------------------------------------------------------------------------- ! sub module_config_ ! { ! my ( $self, $module, $name, $value ) = @_; ! ! return $self->{configuration__}->parameter( $module . "_" . $name, $value ); } |
From: <jgr...@us...> - 2003-03-05 21:16:12
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1:/tmp/cvs-serv23158/Classifier Modified Files: Bayes.pm MailParse.pm Log Message: Statistics and reclassification now work; all configuration parameters now fixed correctly and configuration screens work; history now updates; can look up words; TODO: magnets not working and security page partly broken, need to decide whether to drop stop words or not Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** Bayes.pm 5 Mar 2003 20:06:15 -0000 1.113 --- Bayes.pm 5 Mar 2003 21:15:29 -0000 1.114 *************** *** 111,121 **** # Subject modification (global setting is on) ! $self->config_( 'subject', 1 ); # Adding the X-Text-Classification on ! $self->config_( 'xtc', 1 ); # Adding the X-POPFile-Link is no ! $self->config_( 'xpl', 1 ); # No default unclassified probability --- 111,121 ---- # Subject modification (global setting is on) ! $self->global_config_( 'subject', 1 ); # Adding the X-Text-Classification on ! $self->global_config_( 'xtc', 1 ); # Adding the X-POPFile-Link is no ! $self->global_config_( 'xpl', 1 ); # No default unclassified probability *************** *** 801,805 **** # Add the Subject line modification or the original line back again if ( $classification ne 'unclassified' ) { ! if ( $self->config_( 'subject' ) ) { # Don't add the classification unless it is not present if ( !( $msg_subject =~ /\[\Q$classification\E\]/ ) && --- 801,805 ---- # Add the Subject line modification or the original line back again if ( $classification ne 'unclassified' ) { ! if ( $self->global_config_( 'subject' ) ) { # Don't add the classification unless it is not present if ( !( $msg_subject =~ /\[\Q$classification\E\]/ ) && *************** *** 819,823 **** # Add the XTC header ! $msg_head_after .= "X-Text-Classification: $classification$eol" if ( ( $self->config_( 'xtc' ) ) && ( $self->{parameters__}{$classification}{quarantine} == 0 ) ); --- 819,823 ---- # Add the XTC header ! $msg_head_after .= "X-Text-Classification: $classification$eol" if ( ( $self->global_config_( 'xtc' ) ) && ( $self->{parameters__}{$classification}{quarantine} == 0 ) ); *************** *** 828,835 **** $xpl .= "<http://"; ! $xpl .= $self->config_( 'localpop' )?"127.0.0.1":$self->{hostname__}; ! $xpl .= ":$self->config_( 'ui_port' )/jump_to_message?view=$temp_file>$eol"; ! if ( $self->config_( 'xpl' ) && ( $self->{parameters__}{$classification}{quarantine} == 0 ) ) { $msg_head_after .= 'X-POPFile-Link: ' . $xpl; } --- 828,835 ---- $xpl .= "<http://"; ! $xpl .= $self->module_config_( 'pop3', 'local' )?"127.0.0.1":$self->{hostname__}; ! $xpl .= ":" . $self->module_config_( 'ui', 'port' ) . "/jump_to_message?view=$temp_file>$eol"; ! if ( $self->global_config_( 'xpl' ) && ( $self->{parameters__}{$classification}{quarantine} == 0 ) ) { $msg_head_after .= 'X-POPFile-Link: ' . $xpl; } *************** *** 846,853 **** if ( $classification ne 'unclassified' ) { if ( $self->{parameters__}{$classification}{quarantine} == 1 ) { ! print $client "From: $self->{parser__}->{from}$eol"; ! print $client "To: $self->{parser__}->{to}$eol"; ! print $client "Date: $self->{parser__}->{date}$eol"; ! if ( $self->config_( 'subject' ) ) { # Don't add the classification unless it is not present if ( !( $msg_subject =~ /\[\Q$classification\E\]/ ) && --- 846,853 ---- if ( $classification ne 'unclassified' ) { if ( $self->{parameters__}{$classification}{quarantine} == 1 ) { ! print $client "From: " . $self->{parser__}->get_header( 'from' ) . "$eol"; ! print $client "To: " . $self->{parser__}->get_header( 'to' ) . "$eol"; ! print $client "Date: " . $self->{parser__}->get_header( 'date' ) . "$eol"; ! if ( $self->global_config_( 'subject' ) ) { # Don't add the classification unless it is not present if ( !( $msg_subject =~ /\[\Q$classification\E\]/ ) && *************** *** 857,869 **** } print $client "Subject:$msg_subject$eol"; ! print $client "X-Text-Classification: $classification$eol" if ( $self->config_( 'xtc' ) ); ! print $client 'X-POPFile-Link: ' . $xpl if ( $self->config_( 'xpl' ) ); print $client "Content-Type: multipart/report; boundary=\"$temp_file\"$eol$eol--$temp_file$eol"; print $client "Content-Type: text/plain$eol$eol"; print $client "POPFile has quarantined a message. It is attached to this email.$eol$eol"; print $client "Quarantined Message Detail$eol$eol"; ! print $client "Original From: $self->{parser__}->{from}$eol"; ! print $client "Original Subject: $self->{parser__}->{subject}$eol"; ! print $client "Original To: $self->{parser__}->{to}$eol$eol"; print $client "To examine the email open the attachment. To change this mail's classification go to $xpl$eol"; print $client "--$temp_file$eol"; --- 857,869 ---- } print $client "Subject:$msg_subject$eol"; ! print $client "X-Text-Classification: $classification$eol" if ( $self->global_config_( 'xtc' ) ); ! print $client 'X-POPFile-Link: ' . $xpl if ( $self->global_config_( 'xpl' ) ); print $client "Content-Type: multipart/report; boundary=\"$temp_file\"$eol$eol--$temp_file$eol"; print $client "Content-Type: text/plain$eol$eol"; print $client "POPFile has quarantined a message. It is attached to this email.$eol$eol"; print $client "Quarantined Message Detail$eol$eol"; ! print $client "Original From: " . $self->{parser__}->get_header('from') . "$eol"; ! print $client "Original To: " . $self->{parser__}->get_header('to') . "$eol"; ! print $client "Original Subject: " . $self->{parser__}->get_header('subject') . "$eol"; print $client "To examine the email open the attachment. To change this mail's classification go to $xpl$eol"; print $client "--$temp_file$eol"; *************** *** 963,983 **** # --------------------------------------------------------------------------------------------- # - # get_bucket_word_list - # - # Returns a list of the words in a bucket - # - # $bucket The name of the bucket for which the list is to be obtained - # - # --------------------------------------------------------------------------------------------- - - sub get_bucket_word_list - { - my ( $self, $bucket ) = @_; - - return sort keys %{$self->{matrix__}{$bucket}}; - } - - # --------------------------------------------------------------------------------------------- - # # get_bucket_color # --- 963,966 ---- *************** *** 1158,1196 **** my ( $self, $file, $bucket ) = @_; $self->{parser__}->parse_stream( $file ); foreach my $word (keys %{$self->{parser__}->{words__}}) { ! # TODO $self->set_value_( $bucket, $word, $ += $self->{parser__}->{words__}{$word}; ! $self->{total__}{$bucket} += $self->{parser__}->{words__}{$word}; } ! $self->update_constants_(); ! $self->write_parameters(); ! $self->save_bucket_( $bucket ); } # --------------------------------------------------------------------------------------------- # ! # save_bucket_ # ! # Save the current word scores in a bucket to disk # ! # $bucket Name for the bucket to save # # --------------------------------------------------------------------------------------------- ! sub save_bucket_ { ! my ( $self, $bucket ) = @_; if ( open WORDS, '>' . $self->config_( 'corpus' ) . "/$bucket/table" ) { print WORDS "__CORPUS__ __VERSION__ 1\n"; ! foreach my $word ( keys %{$self->{matrix__}{$bucket}}) { ! print WORDS "$word $self->{matrix__}{$bucket}{$word}\n"; } close WORDS; } ! $self->load_bucket_($self->config_( 'corpus' ) . "/$bucket"); } --- 1141,1243 ---- my ( $self, $file, $bucket ) = @_; + my %words; + + if ( open WORDS, '<' . $self->config_( 'corpus' ) . "/$bucket/table" ) { + while (<WORDS>) { + if ( /__CORPUS__ __VERSION__ (\d+)/ ) { + if ( $1 != $self->{corpus_version__} ) { + print "Incompatible corpus version in $bucket\n"; + return; + } + + next; + } + + if ( /([^\s]+) (\d+)/ ) { + my $word = $self->{mangler__}->mangle($1,1); + my $value = $2; + $value =~ s/[\r\n]//g; + if ( $value > 0 ) { + $words{$word} = $value; + } + } + } + + close WORDS; + } + $self->{parser__}->parse_stream( $file ); foreach my $word (keys %{$self->{parser__}->{words__}}) { ! $words{$word} += $self->{parser__}->{words__}{$word}; } ! if ( open WORDS, '>' . $self->config_( 'corpus' ) . "/$bucket/table" ) { ! print WORDS "__CORPUS__ __VERSION__ 1\n"; ! foreach my $word (sort keys %words) { ! print WORDS "$word $words{$word}\n"; ! } ! close WORDS; ! } ! ! $self->load_word_matrix_(); } # --------------------------------------------------------------------------------------------- # ! # remove_message_from_bucket # ! # Parses a mail message and updates the statistics in the specified bucket # ! # $file Name of file containing mail message to parse ! # $bucket Name of the bucket to be updated # # --------------------------------------------------------------------------------------------- ! sub remove_message_from_bucket { ! my ( $self, $file, $bucket ) = @_; ! ! my %words; ! ! if ( open WORDS, '<' . $self->config_( 'corpus' ) . "/$bucket/table" ) { ! while (<WORDS>) { ! if ( /__CORPUS__ __VERSION__ (\d+)/ ) { ! if ( $1 != $self->{corpus_version__} ) { ! print "Incompatible corpus version in $bucket\n"; ! return; ! } ! ! next; ! } ! ! if ( /([^\s]+) (\d+)/ ) { ! my $word = $self->{mangler__}->mangle($1,1); ! my $value = $2; ! $value =~ s/[\r\n]//g; ! if ( $value > 0 ) { ! $words{$word} = $value; ! } ! } ! } ! ! close WORDS; ! } ! ! $self->{parser__}->parse_stream( $file ); ! ! foreach my $word (keys %{$self->{parser__}->{words__}}) { ! $words{$word} -= $self->{parser__}->{words__}{$word}; ! } if ( open WORDS, '>' . $self->config_( 'corpus' ) . "/$bucket/table" ) { print WORDS "__CORPUS__ __VERSION__ 1\n"; ! foreach my $word (sort keys %words) { ! print WORDS "$word $words{$word}\n"; } close WORDS; } ! $self->load_word_matrix_(); } Index: MailParse.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** MailParse.pm 4 Mar 2003 21:25:19 -0000 1.93 --- MailParse.pm 5 Mar 2003 21:15:32 -0000 1.94 *************** *** 1137,1140 **** --- 1137,1153 ---- } + # --------------------------------------------------------------------------------------------- + # + # get_header - Returns the value of the from, to, subject or cc header + # + # $header Name of header to return (note must be lowercase) + # + # --------------------------------------------------------------------------------------------- + sub get_header + { + my ( $self, $header ) = @_; + + return $self->{$header . '__'}; + } 1; |
From: <jgr...@us...> - 2003-03-05 21:16:11
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1:/tmp/cvs-serv23158/Proxy Modified Files: POP3.pm Log Message: Statistics and reclassification now work; all configuration parameters now fixed correctly and configuration screens work; history now updates; can look up words; TODO: magnets not working and security page partly broken, need to decide whether to drop stop words or not Index: POP3.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** POP3.pm 5 Mar 2003 20:06:17 -0000 1.44 --- POP3.pm 5 Mar 2003 21:15:35 -0000 1.45 *************** *** 61,68 **** # The default timeout in seconds for POP3 commands ! $self->config_( 'timeout', 60 ); # Only accept connections from the local machine for POP3 ! $self->config_( 'local', 1 ); # TODO localpop # Whether to do classification on TOP as well --- 61,68 ---- # The default timeout in seconds for POP3 commands ! $self->global_config_( 'timeout', 60 ); # Only accept connections from the local machine for POP3 ! $self->config_( 'local', 1 ); # Whether to do classification on TOP as well *************** *** 98,102 **** # because we deal with the statistics as we go # - # $kid PID of a child of POP3.pm # $handle The handle of the child's pipe # --- 98,101 ---- *************** *** 104,108 **** sub flush_child_data__ { ! my ( $self, $kid, $handle ) = @_; my $stats_changed = 0; --- 103,107 ---- sub flush_child_data__ { ! my ( $self, $handle ) = @_; my $stats_changed = 0; *************** *** 115,123 **** $class =~ s/[\r\n]//g; ! # TODO $self->{classifier__}->{parameters}{$class}{count} += 1; $self->global_config_( 'mcount', $self->global_config_( 'mcount' ) + 1 ); $stats_changed = 1; ! $self->log_( "Incrementing $class for $kid" ); } else { # This is here so that we get in errorneous position where the pipeready --- 114,123 ---- $class =~ s/[\r\n]//g; ! $self->{classifier__}->set_bucket_parameter( $class, 'count', ! $self->{classifier__}->get_bucket_parameter( $class, 'count' ) + 1 ); $self->global_config_( 'mcount', $self->global_config_( 'mcount' ) + 1 ); $stats_changed = 1; ! $self->log_( "Incrementing $class" ); } else { # This is here so that we get in errorneous position where the pipeready |
From: <jgr...@us...> - 2003-03-05 20:07:03
|
Update of /cvsroot/popfile/engine/UI In directory sc8-pr-cvs1:/tmp/cvs-serv23796/UI Modified Files: HTML.pm Log Message: Added delete_bucket and rename_bucket APIs and hooked them up to the UI; ecount and mcount become global values Index: HTML.pm =================================================================== RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** HTML.pm 4 Mar 2003 22:01:23 -0000 1.104 --- HTML.pm 5 Mar 2003 20:06:18 -0000 1.105 *************** *** 388,392 **** my @buckets = $self->{classifier__}->get_buckets(); my $bc = $#buckets + 1; ! $update_check .= "<img border=\"0\" alt=\"\" src=\"http://www.usethesource.com/cgi-bin/popfile_stats.pl?bc=$bc&mc=$self->config_( 'mcount' )&ec=$self->config_( 'ecount' )\" />\n"; } --- 388,392 ---- my @buckets = $self->{classifier__}->get_buckets(); my $bc = $#buckets + 1; ! $update_check .= "<img border=\"0\" alt=\"\" src=\"http://www.usethesource.com/cgi-bin/popfile_stats.pl?bc=$bc&mc=" . $self->global_config_( 'mcount' ) . "&ec=" . $self->global_config_( 'ecount' ) . "\" />\n"; } *************** *** 1581,1586 **** if ( defined($self->{form__}{reset_stats}) ) { ! $self->config_( 'mcount', 0 ); ! $self->config_( 'ecount', 0 ); for my $bucket ($self->{classifier__}->get_buckets()) { $self->{classifier__}->set_bucket_parameter( $bucket, 'count', 0 ); --- 1581,1586 ---- if ( defined($self->{form__}{reset_stats}) ) { ! $self->global_config_( 'mcount', 0 ); ! $self->global_config_( 'ecount', 0 ); for my $bucket ($self->{classifier__}->get_buckets()) { $self->{classifier__}->set_bucket_parameter( $bucket, 'count', 0 ); *************** *** 1631,1642 **** if ( ( defined($self->{form__}{delete}) ) && ( $self->{form__}{name} ne '' ) ) { $self->{form__}{name} = lc($self->{form__}{name}); ! unlink( $self->config_( 'corpus' ) . "/$self->{form__}{name}/table" ); ! unlink( $self->config_( 'corpus' ) . "/$self->{form__}{name}/params" ); ! unlink( $self->config_( 'corpus' ) . "/$self->{form__}{name}/magnets" ); ! unlink( $self->config_( 'corpus' ) . "/$self->{form__}{name}/color" ); ! rmdir( $self->config_( 'corpus' ) . "/$self->{form__}{name}" ); ! $deletemessage = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error6}, $self->{form__}{name} ) . "</b></blockquote>"; - $self->{classifier__}->load_word_matrix(); } --- 1631,1636 ---- if ( ( defined($self->{form__}{delete}) ) && ( $self->{form__}{name} ne '' ) ) { $self->{form__}{name} = lc($self->{form__}{name}); ! $self->{classifier__}->delete_bucket( $self->{form__}{name} ); $deletemessage = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error6}, $self->{form__}{name} ) . "</b></blockquote>"; } *************** *** 1647,1653 **** $self->{form__}{oname} = lc($self->{form__}{oname}); $self->{form__}{newname} = lc($self->{form__}{newname}); ! rename($self->config_( 'corpus' ) . "/$self->{form__}{oname}" , $self->config_( 'corpus' ) . "/$self->{form__}{newname}"); $rename_message = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error5}, $self->{form__}{oname}, $self->{form__}{newname} ) . "</b></blockquote>"; - $self->{classifier__}->load_word_matrix(); } } --- 1641,1646 ---- $self->{form__}{oname} = lc($self->{form__}{oname}); $self->{form__}{newname} = lc($self->{form__}{newname}); ! $self->{classifier__}->rename_bucket( $self->{form__}{oname}, $self->{form__}{newname} ); $rename_message = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error5}, $self->{form__}{oname}, $self->{form__}{newname} ) . "</b></blockquote>"; } } *************** *** 1754,1763 **** my $number = pretty_number( $self, $self->{classifier__}->get_word_count() ); ! my $pmcount = pretty_number( $self, $self->config_( 'mcount' ) ); ! my $pecount = pretty_number( $self, $self->config_( 'ecount' ) ); my $accuracy = $self->{language__}{Bucket_NotEnoughData}; my $percent = 0; if ( $self->config_( 'mcount' ) > 0 ) { ! $percent = int( 10000 * ( $self->config_( 'mcount' ) - $self->config_( 'ecount' ) ) / $self->config_( 'mcount' ) ) / 100; $accuracy = "$percent%"; } --- 1747,1756 ---- my $number = pretty_number( $self, $self->{classifier__}->get_word_count() ); ! my $pmcount = pretty_number( $self, $self->global_config_( 'mcount' ) ); ! my $pecount = pretty_number( $self, $self->global_config_( 'ecount' ) ); my $accuracy = $self->{language__}{Bucket_NotEnoughData}; my $percent = 0; if ( $self->config_( 'mcount' ) > 0 ) { ! $percent = int( 10000 * ( $self->global_config_( 'mcount' ) - $self->global_config_( 'ecount' ) ) / $self->global_config_( 'mcount' ) ) / 100; $accuracy = "$percent%"; } *************** *** 2439,2443 **** if ( !$reclassified ) { $self->{classifier__}->add_message_to_bucket( $self->global_config_( 'msgdir' ) . $mail_file, $newbucket ); ! # TODO $self->config_( 'ecount' ) += 1 if ( $newbucket ne $bucket ); $self->{logger}->debug( "Reclassifying $mail_file from $bucket to $newbucket" ); --- 2432,2436 ---- 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->{logger}->debug( "Reclassifying $mail_file from $bucket to $newbucket" ); *************** *** 2493,2497 **** if ( $bucket ne $usedtobe ) { ! $self->config_( 'ecount', $self->config_( 'ecount' ) - 1 ) if ( $self->config_( 'ecount' ) > 0 ); # TODO $self->{classifier__}->{parameters}{$bucket}{count} -= 1; # TODO $self->{classifier__}->{parameters}{$usedtobe}{count} += 1; --- 2486,2490 ---- if ( $bucket ne $usedtobe ) { ! $self->global_config_( 'ecount', $self->global_config_( 'ecount' ) - 1 ) if ( $self->global_config_( 'ecount' ) > 0 ); # TODO $self->{classifier__}->{parameters}{$bucket}{count} -= 1; # TODO $self->{classifier__}->{parameters}{$usedtobe}{count} += 1; |
From: <jgr...@us...> - 2003-03-05 20:06:54
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1:/tmp/cvs-serv23796/Proxy Modified Files: POP3.pm Log Message: Added delete_bucket and rename_bucket APIs and hooked them up to the UI; ecount and mcount become global values Index: POP3.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** POP3.pm 3 Mar 2003 23:14:43 -0000 1.43 --- POP3.pm 5 Mar 2003 20:06:17 -0000 1.44 *************** *** 70,75 **** # Start with no messages downloaded and no error ! $self->config_( 'mcount', 0 ); ! $self->config_( 'ecount', 0 ); # This counter is used when creating unique IDs for message stored --- 70,75 ---- # Start with no messages downloaded and no error ! $self->global_config_( 'mcount', 0 ); ! $self->global_config_( 'ecount', 0 ); # This counter is used when creating unique IDs for message stored *************** *** 116,120 **** # TODO $self->{classifier__}->{parameters}{$class}{count} += 1; ! $self->config_( 'mcount' ) += 1; $stats_changed = 1; --- 116,120 ---- # TODO $self->{classifier__}->{parameters}{$class}{count} += 1; ! $self->global_config_( 'mcount', $self->global_config_( 'mcount' ) + 1 ); $stats_changed = 1; *************** *** 131,136 **** if ( $stats_changed ) { ! $self->{ui}->invalidate_history_cache(); ! $self->{configuration}->save_configuration(); $self->{classifier__}->write_parameters(); } --- 131,136 ---- if ( $stats_changed ) { ! $self->{ui__}->invalidate_history_cache(); ! $self->{configuration__}->save_configuration(); $self->{classifier__}->write_parameters(); } |
From: <jgr...@us...> - 2003-03-05 20:06:54
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1:/tmp/cvs-serv23796/Classifier Modified Files: Bayes.pm Log Message: Added delete_bucket and rename_bucket APIs and hooked them up to the UI; ecount and mcount become global values Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** Bayes.pm 4 Mar 2003 22:01:20 -0000 1.112 --- Bayes.pm 5 Mar 2003 20:06:15 -0000 1.113 *************** *** 1100,1103 **** --- 1100,1148 ---- # --------------------------------------------------------------------------------------------- # + # delete_bucket + # + # Deletes a bucket + # + # $bucket Name of the bucket to delete + # + # --------------------------------------------------------------------------------------------- + + sub delete_bucket + { + my ( $self, $bucket ) = @_; + + my $bucket_directory = $self->config_( 'corpus' ) . "/$bucket"; + + unlink( "$bucket_directory/table" ); + unlink( "$bucket_directory/color" ); + unlink( "$bucket_directory/params" ); + unlink( "$bucket_directory/magnets" ); + rmdir( $bucket_directory ); + + $self->load_word_matrix_(); + } + + # --------------------------------------------------------------------------------------------- + # + # rename_bucket + # + # Renames a bucket + # + # $old_bucket The old name of the bucket + # $new_bucket The new name of the bucket + # + # --------------------------------------------------------------------------------------------- + + sub rename_bucket + { + my ( $self, $old_bucket, $new_bucket ) = @_; + + rename($self->config_( 'corpus' ) . "/$old_bucket" , $self->config_( 'corpus' ) . "/$new_bucket"); + + $self->load_word_matrix_(); + } + + # --------------------------------------------------------------------------------------------- + # # add_message_to_bucket # |
From: <jgr...@us...> - 2003-03-04 22:01:56
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1:/tmp/cvs-serv8368/Classifier Modified Files: Bayes.pm Log Message: More stuff works.. more APIs... closing in on completing the OO by tomorrow Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** Bayes.pm 4 Mar 2003 21:25:16 -0000 1.111 --- Bayes.pm 4 Mar 2003 22:01:20 -0000 1.112 *************** *** 878,882 **** if ( $got_full_body == 0 ) { ! echo_to_dot( $self, $mail, $client ) if ( !$nosave ); } else { print $client ".$eol" if ( !$nosave ); --- 878,882 ---- if ( $got_full_body == 0 ) { ! $self->echo_to_dot_( $mail, $client ) if ( !$nosave ); } else { print $client ".$eol" if ( !$nosave ); *************** *** 963,966 **** --- 963,983 ---- # --------------------------------------------------------------------------------------------- # + # get_bucket_word_list + # + # Returns a list of the words in a bucket + # + # $bucket The name of the bucket for which the list is to be obtained + # + # --------------------------------------------------------------------------------------------- + + sub get_bucket_word_list + { + my ( $self, $bucket ) = @_; + + return sort keys %{$self->{matrix__}{$bucket}}; + } + + # --------------------------------------------------------------------------------------------- + # # get_bucket_color # *************** *** 1054,1057 **** --- 1071,1178 ---- return $result; + } + + # --------------------------------------------------------------------------------------------- + # + # create_bucket + # + # Creates a new bucket + # + # $bucket Name for the new bucket + # + # --------------------------------------------------------------------------------------------- + + sub create_bucket + { + my ( $self, $bucket ) = @_; + + mkdir( $self->config_( 'corpus' ) ); + mkdir( $self->config_( 'corpus' ) . "/$bucket" ); + + if ( open NEW, '>' . $self->config_( 'corpus' ) . "/$bucket/table" ) { + print NEW "\n"; + close NEW; + } + + $self->load_word_matrix_(); + } + + # --------------------------------------------------------------------------------------------- + # + # add_message_to_bucket + # + # Parses a mail message and updates the statistics in the specified bucket + # + # $file Name of file containing mail message to parse + # $bucket Name of the bucket to be updated + # + # --------------------------------------------------------------------------------------------- + + sub add_message_to_bucket + { + my ( $self, $file, $bucket ) = @_; + + $self->{parser__}->parse_stream( $file ); + + foreach my $word (keys %{$self->{parser__}->{words__}}) { + # TODO $self->set_value_( $bucket, $word, $ += $self->{parser__}->{words__}{$word}; + $self->{total__}{$bucket} += $self->{parser__}->{words__}{$word}; + } + + $self->update_constants_(); + $self->write_parameters(); + $self->save_bucket_( $bucket ); + } + + # --------------------------------------------------------------------------------------------- + # + # save_bucket_ + # + # Save the current word scores in a bucket to disk + # + # $bucket Name for the bucket to save + # + # --------------------------------------------------------------------------------------------- + + sub save_bucket_ + { + my ( $self, $bucket ) = @_; + + if ( open WORDS, '>' . $self->config_( 'corpus' ) . "/$bucket/table" ) { + print WORDS "__CORPUS__ __VERSION__ 1\n"; + foreach my $word ( keys %{$self->{matrix__}{$bucket}}) { + print WORDS "$word $self->{matrix__}{$bucket}{$word}\n"; + } + close WORDS; + } + + $self->load_bucket_($self->config_( 'corpus' ) . "/$bucket"); + } + + # --------------------------------------------------------------------------------------------- + # + # echo_to_dot_ + # + # $mail The stream (created with IO::) to send the message to (the remote mail server) + # $client The local mail client (created with IO::) that needs the response + # + # echo all information from the $mail server until a single line with a . is seen + # + # --------------------------------------------------------------------------------------------- + sub echo_to_dot_ + { + my ( $self, $mail, $client ) = @_; + + while ( <$mail> ) { + # Check for an abort + last if ( $self->{alive_} == 0 ); + + print $client $_; + + # The termination has to be a single line with exactly a dot on it and nothing + # else other than line termination characters. This is vital so that we do + # not mistake a line beginning with . as the end of the block + last if ( /^\.(\r\n|\r|\n)$/ ); + } } |
From: <jgr...@us...> - 2003-03-04 22:01:28
|
Update of /cvsroot/popfile/engine/UI In directory sc8-pr-cvs1:/tmp/cvs-serv8368/UI Modified Files: HTML.pm Log Message: More stuff works.. more APIs... closing in on completing the OO by tomorrow Index: HTML.pm =================================================================== RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** HTML.pm 4 Mar 2003 21:25:23 -0000 1.103 --- HTML.pm 4 Mar 2003 22:01:23 -0000 1.104 *************** *** 1479,1483 **** $body .= "</font>\n</h2>\n$self->{language__}{SingleBucket_Message1}\n<br /><br />\n<table summary=\"$self->{language__}{Bucket_WordListTableSummary}\">\n"; ! for my $i (@{$self->{classifier__}->{matrix}{$self->{form__}{showbucket}}}) { if ( defined($i) ) { my $j = $i; --- 1479,1483 ---- $body .= "</font>\n</h2>\n$self->{language__}{SingleBucket_Message1}\n<br /><br />\n<table summary=\"$self->{language__}{Bucket_WordListTableSummary}\">\n"; ! for my $i (@{$self->{classifier__}->get_bucket_word_list($self->{form__}{showbucket})}) { if ( defined($i) ) { my $j = $i; *************** *** 1623,1633 **** $create_message = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error2}, $self->{form__}{cname} ) . "</b></blockquote>"; } else { ! mkdir( $self->config_( 'corpus' ) ); ! mkdir( $self->config_( 'corpus' ) . "/$self->{form__}{cname}" ); ! open NEW, ">$self->config_( 'corpus' )/$self->{form__}{cname}/table"; ! print NEW "\n"; ! close NEW; ! $self->{classifier__}->load_word_matrix(); ! $create_message = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error3}, $self->{form__}{cname} ) . "</b></blockquote>"; } --- 1623,1627 ---- $create_message = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error2}, $self->{form__}{cname} ) . "</b></blockquote>"; } else { ! $self->{classifier__}->create_bucket( $self->{form__}{cname} ); $create_message = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error3}, $self->{form__}{cname} ) . "</b></blockquote>"; } *************** *** 2432,2443 **** } - # The temp_corpus hash has two levels of keys: $temp_corpus{bucket}{word} - # where bucket is the name of one of the current buckets and word is a word - # in that bucket. The value stored in the hash is the word count. - # - # TODO: this needs factoring out of here and into Classifier::Bayes - - my %temp_corpus; - # At this point %messages maps that files that need reclassifying to their # new bucket classification --- 2426,2429 ---- *************** *** 2452,2488 **** if ( !$reclassified ) { ! ! # load the bucket corpus once ! ! if (!defined( $temp_corpus{$newbucket} ) ) { ! if ( open WORDS, "<$self->config_( 'corpus' )/$newbucket/table" ) { ! while (<WORDS>) { ! if ( /__CORPUS__ __VERSION__ (\d+)/ ) { ! if ( $1 != 1 ) { ! print "Incompatible corpus version in $newbucket\n"; ! return; ! } ! ! next; ! } ! ! $temp_corpus{$newbucket}{$1} = $2 if ( /([^\s]+) (\d+)/ ); ! } ! close WORDS; ! } ! } ! ! # Parse the messages and tally the word-count ! ! $self->{classifier__}->{parser}->parse_stream( $self->global_config_( 'msgdir' ) . "$mail_file" ); ! ! foreach my $word (keys %{$self->{classifier__}->{parser}->{words}}) { ! $self->{classifier__}->get_word_count() += $self->{classifier__}->{parser}->{words}{$word}; ! $temp_corpus{$newbucket}{$word} += $self->{classifier__}->{parser}->{words}{$word}; ! } ! ! # Update statistics ! ! $self->config_( 'ecount' ) += 1 if ( $newbucket ne $bucket ); $self->{logger}->debug( "Reclassifying $mail_file from $bucket to $newbucket" ); --- 2438,2443 ---- if ( !$reclassified ) { ! $self->{classifier__}->add_message_to_bucket( $self->global_config_( 'msgdir' ) . $mail_file, $newbucket ); ! # TODO $self->config_( 'ecount' ) += 1 if ( $newbucket ne $bucket ); $self->{logger}->debug( "Reclassifying $mail_file from $bucket to $newbucket" ); *************** *** 2505,2529 **** $self->{feedback}{$mail_file} = sprintf( $self->{language__}{History_ChangedTo}, $self->{classifier__}->get_bucket_color($newbucket), $newbucket ) - } - } - - # Commit the buckets ! $self->{classifier__}->update_constants(); ! $self->{classifier__}->write_parameters(); ! ! foreach my $abucket ( keys %temp_corpus ) { ! if ( open WORDS, ">$self->config_( 'corpus' )/$abucket/table" ) { ! print WORDS "__CORPUS__ __VERSION__ 1\n"; ! foreach my $word ( keys %{$temp_corpus{$abucket}} ) { ! print WORDS "$word $temp_corpus{$abucket}{$word}\n" if ( $temp_corpus{$abucket}{$word} > 0 ); ! } ! close WORDS; } - - $self->{classifier__}->load_bucket($self->config_( 'corpus' ) . "/$abucket"); } - - $self->{configuration}->save_configuration(); } } --- 2460,2467 ---- $self->{feedback}{$mail_file} = sprintf( $self->{language__}{History_ChangedTo}, $self->{classifier__}->get_bucket_color($newbucket), $newbucket ) ! # TODO $self->{configuration}->save_configuration(); } } } } *************** *** 2550,2583 **** if ( defined( $usedtobe ) ) { ! if (!defined( $temp_corpus{bucket} ) ) { ! if ( open WORDS, "<$self->config_( 'corpus' )/$bucket/table" ) { ! while (<WORDS>) { ! if ( /__CORPUS__ __VERSION__ (\d+)/ ) { ! if ( $1 != 1 ) { ! print "Incompatible corpus version in $bucket\n"; ! return; ! } ! ! next; ! } ! ! $temp_corpus{$bucket}{$1} = $2 if ( /([^\s]+) (\d+)/ ); ! } ! close WORDS; ! } ! } ! ! $self->{classifier__}->{parser}->parse_stream($self->global_config_( 'msgdir' ) . "$mail_file"); ! ! # Tally the words ! ! foreach my $word (keys %{$self->{classifier__}->{parser}->{words}}) { ! $self->{classifier__}->get_word_count() -= $self->{classifier__}->{parser}->{words}{$word}; ! $temp_corpus{$bucket}{$word} -= $self->{classifier__}->{parser}->{words}{$word}; ! ! delete $temp_corpus{$bucket}{$word} if ( $temp_corpus{$bucket}{$word} <= 0 ); ! } ! ! # Update statistics $self->log_( "Undoing $mail_file from $bucket to $usedtobe" ); --- 2488,2492 ---- if ( defined( $usedtobe ) ) { ! $self->{classifier__}->remove_message_from_bucket($self->global_config_( 'msgdir' ) . $mail_file); $self->log_( "Undoing $mail_file from $bucket to $usedtobe" ); *************** *** 2604,2626 **** $self->{feedback}{$mail_file} = sprintf( $self->{language__}{History_ChangedTo}, ($self->{classifier__}->get_bucket_color($usedtobe) || ''), $usedtobe ); } - - # Commit the buckets - - $self->{classifier__}->write_parameters(); - $self->{configuration}->save_configuration(); - - foreach my $abucket ( keys %temp_corpus ) { - if ( open WORDS, ">$self->config_( 'corpus' )/$abucket/table" ) { - print WORDS "__CORPUS__ __VERSION__ 1\n"; - foreach my $word ( keys %{$temp_corpus{$abucket}} ) { - print WORDS "$word $temp_corpus{$abucket}{$word}\n" if ( $temp_corpus{$abucket}{$word} > 0 ); - } - close WORDS; - } - - $self->{classifier__}->load_bucket($self->config_( 'corpus' ) . "/$abucket"); - } - - $self->{classifier__}->update_constants(); } } --- 2513,2516 ---- |
From: <jgr...@us...> - 2003-03-04 21:25:59
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1:/tmp/cvs-serv23038/Classifier Modified Files: Bayes.pm MailParse.pm Log Message: Viewing of colorized messages is working again; new get_html_colored_message API in Classifier::Bayes Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** Bayes.pm 3 Mar 2003 23:14:37 -0000 1.110 --- Bayes.pm 4 Mar 2003 21:25:16 -0000 1.111 *************** *** 187,191 **** # --------------------------------------------------------------------------------------------- # ! # get_color_ # # Retrieves the color for a specific word, color is the most likely bucket --- 187,191 ---- # --------------------------------------------------------------------------------------------- # ! # get_color # # Retrieves the color for a specific word, color is the most likely bucket *************** *** 194,198 **** # # --------------------------------------------------------------------------------------------- ! sub get_color_ { my ($self, $word) = @_; --- 194,198 ---- # # --------------------------------------------------------------------------------------------- ! sub get_color { my ($self, $word) = @_; *************** *** 650,654 **** $wordstr = "$1..."; } ! my $wordcolor = get_color_($self, $word); my $wordprobstr = sprintf("%12.4f", $wordprob{$word} / $wtprob{$word}); my $otherprobstr = sprintf("%12.4f", $wbprob{$word}{$ranking[0]} / $wtprob{$word}); --- 650,654 ---- $wordstr = "$1..."; } ! my $wordcolor = get_color($self, $word); my $wordprobstr = sprintf("%12.4f", $wordprob{$word} / $wtprob{$word}); my $otherprobstr = sprintf("%12.4f", $wbprob{$word}{$ranking[0]} / $wtprob{$word}); *************** *** 1031,1034 **** --- 1031,1057 ---- $self->{parameters__}{$bucket}{$parameter} = $value; + } + + # --------------------------------------------------------------------------------------------- + # + # get_html_colored_message + # + # Parser a mail message stored in a file and returns HTML representing the message + # with coloring of the words + # + # $file The file to parse + # + # --------------------------------------------------------------------------------------------- + + sub get_html_colored_message + { + my ( $self, $file ) = @_; + + $self->{parser__}->{color__} = 1; + $self->{parser__}->{bayes__} = bless $self; + my $result = $self->{parser__}->parse_stream($file); + $self->{parser__}->{color__} = 0; + + return $result; } Index: MailParse.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** MailParse.pm 3 Mar 2003 15:21:39 -0000 1.92 --- MailParse.pm 4 Mar 2003 21:25:19 -0000 1.93 *************** *** 154,158 **** if ( $self->{color__} ) { ! my $color = $self->{bayes}->get_color($mword); if ( $encoded == 0 ) { $after = '&' if ( $after eq '>' ); --- 154,158 ---- if ( $self->{color__} ) { ! my $color = $self->{bayes__}->get_color($mword); if ( $encoded == 0 ) { $after = '&' if ( $after eq '>' ); |
From: <jgr...@us...> - 2003-03-04 21:25:35
|
Update of /cvsroot/popfile/engine/UI In directory sc8-pr-cvs1:/tmp/cvs-serv23038/UI Modified Files: HTML.pm Log Message: Viewing of colorized messages is working again; new get_html_colored_message API in Classifier::Bayes Index: HTML.pm =================================================================== RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** HTML.pm 4 Mar 2003 15:49:25 -0000 1.102 --- HTML.pm 4 Mar 2003 21:25:23 -0000 1.103 *************** *** 2961,2968 **** if ( $self->{history__}{$mail_file}{magnet} eq '' ) { ! $self->{classifier__}->{parser}->{color} = 1; ! $self->{classifier__}->{parser}->{bayes} = $self->{classifier__}; ! $body .= $self->{classifier__}->{parser}->parse_stream($self->global_config_( 'msgdir' ) . "$self->{form__}{view}"); ! $self->{classifier__}->{parser}->{color} = 0; } else { $self->{history__}{$mail_file}{magnet} =~ /(.+): ([^\r\n]+)/; --- 2961,2965 ---- if ( $self->{history__}{$mail_file}{magnet} eq '' ) { ! $body .= $self->{classifier__}->get_html_colored_message($self->global_config_( 'msgdir' ) . $self->{form__}{view}); } else { $self->{history__}{$mail_file}{magnet} =~ /(.+): ([^\r\n]+)/; |
From: <jgr...@us...> - 2003-03-04 15:49:58
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1:/tmp/cvs-serv28711/POPFile Modified Files: Logger.pm Log Message: Broke my own rule about surrounding things with parens and got bitten Index: Logger.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Logger.pm 3 Mar 2003 22:01:33 -0000 1.10 --- Logger.pm 4 Mar 2003 15:49:24 -0000 1.11 *************** *** 94,98 **** if ( $self->{today__} > $yesterday ) { ! my @debug_files = glob $self->config_( 'logdir' ) . 'popfile*.log'; foreach my $debug_file (@debug_files) { --- 94,98 ---- if ( $self->{today__} > $yesterday ) { ! my @debug_files = glob( $self->config_( 'logdir' ) . 'popfile*.log' ); foreach my $debug_file (@debug_files) { |
From: <jgr...@us...> - 2003-03-04 15:49:30
|
Update of /cvsroot/popfile/engine/UI In directory sc8-pr-cvs1:/tmp/cvs-serv28711/UI Modified Files: HTML.pm Log Message: Broke my own rule about surrounding things with parens and got bitten Index: HTML.pm =================================================================== RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** HTML.pm 3 Mar 2003 23:14:44 -0000 1.101 --- HTML.pm 4 Mar 2003 15:49:25 -0000 1.102 *************** *** 705,711 **** $self->config_( 'xpl', $self->{form__}{xpl}-1 ) if ( ( defined($self->{form__}{xpl}) ) && ( ( $self->{form__}{xpl} >= 1 ) && ( $self->{form__}{xpl} <= 2 ) ) ); ! if ( defined($self->{form__}{language__}) ) { ! if ( $self->config_( 'language' ) ne $self->{form__}{language__} ) { ! $self->config_( 'language', $self->{form__}{language__} ); load_language( $self, $self->config_( 'language' ) ); } --- 705,711 ---- $self->config_( 'xpl', $self->{form__}{xpl}-1 ) if ( ( defined($self->{form__}{xpl}) ) && ( ( $self->{form__}{xpl} >= 1 ) && ( $self->{form__}{xpl} <= 2 ) ) ); ! if ( defined($self->{form__}{language}) ) { ! if ( $self->config_( 'language' ) ne $self->{form__}{language} ) { ! $self->config_( 'language', $self->{form__}{language} ); load_language( $self, $self->config_( 'language' ) ); } *************** *** 2146,2150 **** # for non-culling and new entries that need to be added to the end ! my @history_files = sort compare_mf glob $self->global_config_( 'msgdir' ) . "popfile*=*.msg"; foreach my $i ( 0 .. $#history_files ) { --- 2146,2150 ---- # for non-culling and new entries that need to be added to the end ! my @history_files = sort compare_mf glob( $self->global_config_( 'msgdir' ) . "popfile*=*.msg" ); foreach my $i ( 0 .. $#history_files ) { *************** *** 3363,3367 **** if ( $self->{today} > $yesterday ) { ! my @mail_files = glob $self->global_config_( 'msgdir' ) . "popfile*=*.msg"; foreach my $mail_file (@mail_files) { --- 3363,3367 ---- if ( $self->{today} > $yesterday ) { ! my @mail_files = glob( $self->global_config_( 'msgdir' ) . "popfile*=*.msg" ); foreach my $mail_file (@mail_files) { *************** *** 3375,3379 **** # Clean up old style msg/cls files ! @mail_files = glob $self->global_config_( 'msgdir' ) . "popfile*_*.???"; foreach my $mail_file (@mail_files) { --- 3375,3379 ---- # Clean up old style msg/cls files ! @mail_files = glob( $self->global_config_( 'msgdir' ) . "popfile*_*.???" ); foreach my $mail_file (@mail_files) { |
From: <jgr...@us...> - 2003-03-04 01:17:43
|
Update of /cvsroot/popfile/engine/languages In directory sc8-pr-cvs1:/tmp/cvs-serv5188 Added Files: Chinese-Simplified.msg Chinese-Traditional.msg Log Message: Added Chinese translation --- NEW FILE: Chinese-Simplified.msg --- # Copyright (c) 2001-2003 John Graham-Cumming # Simple Chinese Translated By Mark Wu, 2003/03/04 # Identify the language and character set used for the interface LanguageCode cn LanguageCharset GB2312 # This is used to get the appropriate subdirectory for the manual ManualLanguage en # Common words that are used on their own all over the interface Apply Ì×Óà On ¿ª Off ¹Ø TurnOn ¿ªÆô TurnOff ¹Ø±Õ Add ¼ÓÈë Remove ÒÆ³ý Previous ÉÏÒ»Ò³ Next ÏÂÒ»Ò³ From ¼Ä¼þÕß Subject Ö÷Ö¼ Classification ·ÖÀà Reclassify ÖØÐ·ÖÀà Undo ¸´Ô Close ¹Ø±Õ Find ËÑѰ Filter ¹ýÂË Yes ÊÇ No ·ñ ChangeToYes ÊÇ ChangeToNo ·ñ Bucket ·ÖÀà Magnet ¹æÔò Delete ɾ³ý Create ½¨Á¢ To ÊÕ¼þÕß Total È«²¿ Rename ÖØÐÂÃüÃû Frequency ƵÂÊ Probability »úÂÊ Score ·ÖÊý Lookup ²é¿´ # The header and footer that appear on every UI page Header_Title POPFile ¿ØÖÆÌ¨ Header_Shutdown Í£Ö¹ POPFile Header_History ÀúÊ· Header_Buckets ·ÖÀà Header_Configuration É趨 Header_Advanced ½ø½× Header_Security °²È« Header_Magnets ¹æÔò Footer_HomePage POPFile Ê×Ò³ Footer_Manual ʹÓÃÊÖ²á Footer_Forums ÂÛ̳ Footer_FeedMe ÔÞÖú Footer_RequestFeature ¹¦Äܽ¨Òé Footer_MailingList ÓʼþȺ×é Configuration_Error1 ·Ö¸ô×ÖÔª±ØÐëΪµ¥Ò»×ÖÔª Configuration_Error2 ʹÓÃÕß½éÃæÁ¬½Ó²º±ØÐë½éÓÚ 1 µ½ 65535 Ö®¼ä Configuration_Error3 ÄÚ¼ÄËÅ·þÆ÷Á¬½Ó²º±ØÐë½éÓÚ 1 µ½ 65535 Ö®¼ä Configuration_Error4 ÿһҳÏÔʾÐżþÊý±ØÐë½éÓÚ 1 µ½ 1000 Ö®¼ä Configuration_Error5 ÀúÊ·¼Í¼ÌìÊý±ØÐë½éÓÚ 1 µ½ 366 Ö®¼ä Configuration_Error6 TCP Á¬½ÓÓâʱÃëÊý½éÓÚ 10 µ½ 300 Ö®¼ä Configuration_POP3Port ÄÚ¼ÄËÅ·þÆ÷Á¬½Ó²º Configuration_POP3Update ¸ü¸ÄÄÚ¼ÄËÅ·þÆ÷Á¬½Ó²ºÎª %s; ÐèÖØÐÂÆô¶¯ POPFile Configuration_Separator ·Ö¸ô×ÖÔª Configuration_SepUpdate ¸ü¸Ä·Ö¸ô×ÖԪΪ %s Configuration_UI ʹÓÃÕß½éÃæÁ¬½Ó²º Configuration_UIUpdate ¸ü¸ÄʹÓÃÕß½éÃæÁ¬½Ó²ºÎª %s; ÐèÖØÐÂÆô¶¯ POPFile Configuration_History ÿһҳÏÔʾÐżþÊý Configuration_HistoryUpdate ¸ü¸ÄÿһҳÏÔʾÐżþÊýΪ to %s Configuration_Days ÀúÊ·¼Í¼ÌìÊý Configuration_DaysUpdate ¸ü¸ÄÀúÊ·¼Í¼ÌìÊýΪ %s Configuration_UserInterface ʹÓÃÕß½éÃæ Configuration_Skins Ãæ°æ Configuration_SkinsChoose Ñ¡ÔñÃæ°æ Configuration_Language ÓïÑÔ Configuration_LanguageChoose Ñ¡ÔñÓïÑÔ Configuration_ListenPorts Á¬½Ó²º Configuration_HistoryView ÀúÊ·¼ìÊÓ Configuration_TCPTimeout TCP Á¬½ÓÓâʱ Configuration_TCPTimeoutSecs TCP Á¬½ÓÓâʱÃëÊý Configuration_TCPTimeoutUpdate ¸ü¸Ä TCP Á¬½ÓÓâʱΪ %s Ãë Configuration_ClassificationInsertion E-Mail ÄÚÈÝÐÞ¸Ä Configuration_SubjectLine Ö÷Ö¼¼ÓÈë[·ÖÀàÃû³Æ] Configuration_XTCInsertion ¼ÓÈë X-Text-Classification µ½Ðżþ±êÌâÖÐ Configuration_XPLInsertion ¼ÓÈë X-POPFile-Link µ½Ðżþ±êÌâÖÐ Configuration_Logging ¼Í¼ Configuration_None ÎÞ Configuration_ToScreen Êä³öµ½Ó©Ä» Configuration_ToFile Êä³öµ½µµ°¸ Configuration_ToScreenFile Êä³öµ½Ó©Ä»Óëµµ°¸ Configuration_LoggerOutput ¼Ç¼Êä³ö·½Ê½ Configuration_GeneralSkins Ãæ°æ Configuration_SmallSkins Ãæ°æ(С×ÖÐÎ) Configuration_TinySkins Ãæ°æ(ÃÔÄã×ÖÐÎ) Advanced_Error1 '%s' ÒѾ´æÔÚºöÂÔµ¥×Ö×Ö±íÖÐ Advanced_Error2 ºöÂÔµ¥×ÖÖ»¿É°üº¬Ó¢ÎÄ,Êý×Ö, ., _, -, »ò @ µÈ×ÖÔª Advanced_Error3 '%s' ÒѾ¼ÓÈëºöÂÔµ¥×Ö×Ö±íÖÐ Advanced_Error4 '%s' ²»´æÔÚºöÂÔµ¥×Ö×Ö±íÖÐ Advanced_Error5 '%s' ÒѾ´ÓºöÂÔµ¥×Ö×Ö±íÖÐÒÆ³ý Advanced_StopWords ºöÂÔµ¥×Ö×Ö±í Advanced_Message1 POPFile »áºöÂÔÒÔϳöÏÖÆµÂʽϸߵĵ¥×Ö: Advanced_AddWord ¼ÓÈëµ¥×Ö Advanced_RemoveWord ÒÆ³ýµ¥×Ö History_Filter (ÏÔʾ·ÖÀà <font color="%s">%s</font>) History_FilterBy ¹ýÂËÌõ¼þ History_Search (ËÑѰ¼Ä¼þÕß/Ö÷Ö¼ %s) History_Title ×î½üÐżþ History_Jump ÒÆÖÁÐżþ History_ShowAll È«²¿ÏÔʾ History_ShouldBe Ó¦¸ÃÊÇ History_NoFrom ûÓмļþÕß History_NoSubject ûÓÐÖ÷Ö¼ History_ClassifyAs ·ÖÀàΪ History_MagnetUsed ʹÓùæÔò History_ChangedTo ¸Ä±äΪ <font color="%s">%s History_Already ÒÑ¾ÖØÐ·ÖÀàΪ <font color="%s">%s</font> History_RemoveAll È«²¿ÒƳý History_RemovePage ÒÆ³ýÕâÒ»Ò³ History_Remove ÒÆ³ýÀúÊ·Ðżþ History_SearchMessage ËÑѰ¼Ä¼þÕß/Ö÷Ö¼ History_NoMessages ûÓÐÈκÎѶϢ History_ShowMagnet ʹÓùæÔò History_Magnet (Ö»ÏÔʾʹÓùæÔò·ÖÀàµÄÐżþ) History_ResetSearch ÖØÉè Password_Title ÃÜÂë Password_Enter ÊäÈëÃÜÂë Password_Go ½øÈë Password_Error1 ÃÜÂë´íÎó Security_Error1 ÑéÖ¤ËÅ·þÆ÷Á¬½Ó²º±ØÐë½éÓÚ 1 µ½ 65535 Ö®¼ä Security_Stealth µ¥»ú/Ö÷»úģʽÉ趨 Security_NoStealthMode ·ñ (µ¥»úģʽ) Security_ExplainStats (¿ªÆôÕâ¸ö¹¦ÄÜ, »áʹ POPFile ÿÌì´«ËÍÈý¸öÌØ¶¨µÄ×ÊÁϵ½ www.usethesource.com: °üº¬ bc (ËùÓзÖÀàµÄ¸öÊý), mc (ËùÓÐ POPFile ·ÖÀà¹ýµÄÐżþÊý) and ec (ËùÓеķÖÀà´íÎó´ÎÊý). ÎÒ»áÀûÓÃÕâЩ×ÊÁÏÀ´Í³¼Æ²¢·ÖÎöʹÓÃÕßÈçºÎÀ´Ó¦Óà POPFile. ÎÒµÄÍøÕ¾»á½«ÕâЩ×ÊÁϱ£ÁôÎåÌì, ÎåÌìºó»á×Ô¶¯½«ÕâЩ×ÊÁÏ´Ó×ÊÁÏ¿âÖÐÒÆ³ý; ÎÒûÓб£ÁôÈκÎÄãµÄIPλַÔÚÕâЩ´«ÊäµÄ×ÊÁÏÖÐ.) Security_ExplainUpdate (¿ªÆôÕâ¸ö¹¦ÄÜ, »áʹ POPFile ÿÌì´«ËÍÈý¸öÌØ¶¨µÄ×ÊÁϵ½ www.usethesource.com: °üº¬ ma (Äã°²×°µÄ POPFile µÄÖ÷Òª°æ±¾), mi (Äã°²×°µÄ POPFile µÄ´ÎÒª°æ±¾) and bn (Äã°²×°µÄ POPFile µÄ½¨Á¢´úÂë). Èç¹û POPFile µÄÐÂ°æ´æÔÚ, »áÔÚ POPFile ¿ØÖÆÖÐÐÄÊ×Ò³ÏÔʾ¸üÐÂ×ÊѶ. ÎÒµÄÍøÕ¾»á½«ÕâЩ×ÊÁϱ£ÁôÎåÌì, ÎåÌìºó»á×Ô¶¯½«ÕâЩ×ÊÁÏ´Ó×ÊÁÏ¿âÖÐÒÆ³ý; ÎÒûÓб£ÁôÈκÎÄãµÄIPλַÔÚÕâЩ´«ÊäµÄ×ÊÁÏÖÐ.) Security_PasswordTitle ʹÓÃÕß½éÃæÃÜÂëÉ趨 Security_Password ÃÜÂë Security_PasswordUpdate ¸ü¸ÄÃÜÂëΪ %s Security_AUTHTitle °²È«ÃÜÂëÑéÖ¤ Security_SecureServer ÑéÖ¤ËÅ·þÆ÷ Security_SecureServerUpdate ¸ü¸Ä°²È«ÃÜÂëÑéÖ¤ËÅ·þÆ÷Ϊ %s; ÐèÖØÐÂÆô¶¯ POPFile Security_SecurePort ÑéÖ¤ËÅ·þÆ÷Á¬½Ó²º Security_SecurePortUpdate ¸ü¸ÄÑéÖ¤ËÅ·þÆ÷Á¬½Ó²ºÎª %s; ÐèÖØÐÂÆô¶¯ POPFile Security_POP3 ÔÊÐíÔ¶¶Ë¿ªÆô POP3 Á¬Ïß; ÐèÖØÐÂÆô¶¯ POPFile Security_UI ÔÊÐíÔ¶¶Ë¿ªÆô HTTP Á¬Ïßµ½Ê¹ÓÃÕß½éÃæ; ÐèÖØÐÂÆô¶¯ POPFile Security_UpdateTitle ×Ô¶¯¸üмì²é Security_Update ÿÌì¼ì²é POPFile ÊÇ·ñÓиüа汾 Security_StatsTitle ±¨¸æÍ³¼Æ×ÊÁÏ Security_Stats ÿÌì´«ËÍͳ¼Æ×ÊÁÏ Magnet_Error1 ¹æÔò '%s' ÒѾ´æÔÚ·ÖÀà '%s' ÖÐ Magnet_Error2 йæÔò '%s' Óë¹æÔò '%s' ÔÚ·ÖÀà '%s' ÖÐÖØ¸´£¬¿ÉÄܻᵼÖÂÎóÅÐ. йæÔòδ¼ÓÈë. Magnet_Error3 ½¨Á¢Ð¹æÔò '%s' ÔÚ·ÖÀà '%s' ÖÐ Magnet_CurrentMagnets ÏÖÓйæÔò Magnet_Message1 ÒÔÏµĹæÔò»áʹµÄÐżþ×ÜÊǹéÀàµ½ÌØ¶¨µÄ·ÖÀàÖÐ. Magnet_CreateNew ½¨Á¢Ð¹æÔò Magnet_Explanation ÏÖÓÐÈý¸ö¹æÔòÀà±ð:</b> <ul><li><b>¼Ä¼þÕߵĵç×ÓÓʼþÐÅÏä»òÐÕÃû:</b> ÀýÈç: jo...@co... ¶ÔÓ¦µ½Ò»¸öÌØ¶¨µÄµç×ÓÓʼþÐÅÏä, <br />company.com ¶ÔÓ¦µ½Ã¿Ò»¸öÀ´×ÔÓÚ company.com µÄ¼Ä¼þÕß, <br />John Doe ¶ÔÓ¦µ½Ò»¸öÌØ¶¨µÄÐÕÃû, John ¶ÔÓ¦µ½Ã¿Ò»¸öÃû×ÖÖÐÓÐ John µÄÈË</li><li><b>ÊÕ¼þÕߵĵç×ÓÓʼþÐÅÏä»òÐÕÃû:</b> Èçͬ¼Ä¼þÕߵĹæÔòÀà±ðÒ»Ñù£¬Ö»ÊÇÕâ¸ö¹æÔòÀà±ðÊÇÕë¶ÔÊÕ¼þÕß</li> <li><b>ÐżþÖ÷Ö¼ÖеÄÌØ¶¨µ¥×Ö</b> ÀýÈç: hello »á¶ÔÓ¦µ½ËùÓÐÐżþÖ÷Ö¼ÖÐÓÐ hello µÄÐżþ</li></ul> Magnet_MagnetType ¹æÔòÀà±ð Magnet_Value Öµ Magnet_Always ×ÜÊǹéÀൽ·ÖÀà Bucket_Error1 ·ÖÀàÖ»¿É°üº¬Ð¡Ð´µÄÓ¢ÎÄ a µ½ z ÒÔ¼° - Óë _ Bucket_Error2 ·ÖÀà %s ÒѾ´æÔÚ Bucket_Error3 ÒѾ½¨Á¢·ÖÀà %s Bucket_Error4 ÇëÊäÈë맪¿Õ°×µÄ×ÖÔª Bucket_Error5 ÖØÐÂÃüÃû·ÖÀà %s Ϊ %s Bucket_Error6 ÒѾɾ³ý·ÖÀà %s Bucket_Title ×ܽá Bucket_BucketName ·ÖÀàÃû³Æ Bucket_WordCount È«²¿µ¥×Ö×ÖÊý Bucket_WordCounts ³öÏÖ×ÖÊýͳ¼Æ Bucket_UniqueWords ·ÇÖØ¸´µ¥×Ö×ÖÊý Bucket_SubjectModification Ö÷Ö¼¼ÓÈë[·ÖÀàÃû³Æ] Bucket_ChangeColor ¸ü¸ÄÑÕÉ« Bucket_NotEnoughData ûÓÐ×ã¹»×ÊÁÏ Bucket_ClassificationAccuracy ·ÖÀà׼ȷÂÊ Bucket_EmailsClassified ÒÑ·ÖÀàµÄÐżþÊý Bucket_EmailsClassifiedUpper Ðżþ·ÖÀà½á¹û Bucket_ClassificationErrors ·ÖÀà´íÎó´ÎÊý Bucket_Accuracy ׼ȷÂÊ Bucket_ClassificationCount Ðżþ·ÖÀàͳ¼Æ Bucket_ResetStatistics ÖØÉèͳ¼Æ¼Ç¼ Bucket_LastReset ÉÏ´ÎÖØÉèʱ¼äΪ Bucket_CurrentColor %s ÏÖÔÚÑÕÉ«ÊÇ %s Bucket_SetColorTo ¸ü¸ÄÑÕÉ« %s Ϊ %s Bucket_Maintenance ά»¤ Bucket_CreateBucket ½¨Á¢·ÖÀà Bucket_DeleteBucket ɾ³ý·ÖÀà Bucket_RenameBucket ÖØÐÂÃüÃû·ÖÀà Bucket_Lookup ²é¿´ Bucket_LookupMessage ²é¿´·ÖÀàÖеĵ¥×Ö Bucket_LookupMessage2 ²é¿´½á¹û Bucket_LookupMostLikely <b>%s</b> ×î³£³öÏÖÔÚ·ÖÀà <font color="%s">%s</font> Bucket_DoesNotAppear <p><b>%s</b> ûÓгöÏÖÔÚÈκηÖÀàÖÐ Bucket_DisabledGlobally È«²¿Í£Ö¹ Bucket_To Ϊ Bucket_Quarantine ¸ôÀë SingleBucket_Title Ïêϸ×ÊÁÏ %s SingleBucket_WordCount ·ÖÀà×ÖÊýͳ¼Æ SingleBucket_TotalWordCount È«²¿×ÖÊýͳ¼Æ SingleBucket_Percentage Õ¼°Ù·Ö±È SingleBucket_WordTable ×Ö±í %s SingleBucket_Message1 ±êʾ (*) µÄµ¥×Ö´ú±íÒѱ»Ê¹ÓÃÔÚ POPFile ÕâÒ»´Î Session µÄ·ÖÀàÖÐ. °´ÈκÎÒ»¸öµ¥×ÖÈ¥²é¿´ËûÔÚÿһ¸ö·ÖÀàÖгöÏߵĻúÂÊ. SingleBucket_Unique %s ·ÇÖØ¸´ Session_Title POPFile Session ÒѾ¹ýÆÚ Session_Error ÄãµÄ POPFile session ÒѾ¹ýÆÚ. This could have been caused by starting and stopping POPFile but leaving your web browser open. Please click one of the links above to continue using POPFile. Header_MenuSummary This table is the navigation menu which allows access to each of the different pages of the control center. History_MainTableSummary This table shows the sender and subject of recently received messages and allows them to be reviewed and reclassified. Clicking on the subject line will show the full message text, along with information about why it was classified as it was. The 'Should be' column allows you to specify which bucket the message belongs in, or to undo that change. The 'Delete' column allows you to delete specific messages from the history if you don't need them anymore. History_OpenMessageSummary This table contains the full text of an email message, with the words that are used for classification highlighted according to the bucket that was most relevant for each. Bucket_MainTableSummary This table provides an overview of the classification buckets. Each row shows the bucket name, the word count total for that bucket, the actual number of individual words in each bucket, whether the email's subject line will be modified when it gets classified to that bucket, whether to quarantine the messages received in that bucket, and a table to pick the color used in displaying anything related to that bucket in the control center. Bucket_StatisticsTableSummary This table provides three sets of statistics on the overall performance of POPFile. The first is how accurate its classification is, the second is how many emails have been classified, and to which buckets, and the third is how many words are in each bucket, and what their relative percentages are. Bucket_MaintenanceTableSummary This table contains forms that allow you to create, delete or rename buckets, and to lookup a word in all of the buckets to see its relative probabilities. Bucket_AccuracyChartSummary This table graphically represents the accuracy of the email classification. Bucket_BarChartSummary This table graphically represents a percentage allocation for each of the different buckets. It is used for both number of emails classified, and total word counts. Bucket_LookupResultsSummary This table shows the probabilities associated with any given word of the corpus. For each bucket, it shows the frequency that that word occurs, the probability that it will occur in that bucket, and the overall effect on the score of the bucket if that word exists in an email. Bucket_WordListTableSummary This table provides a listing of all the words for a particular bucket, organized by common first letter for each row. Magnet_MainTableSummary This table shows the list of magnets that are used to automatically classify email according to fixed rules. Each row shows how the magnet is defined, what bucket it is intended for, and a button to delete the magnet. Configuration_MainTableSummary This table contains a number of forms to allow you to control the configuration of POPFile. Configuration_InsertionTableSummary This table contains buttons that determine whether or not certain modifications are made to the headers or subject line of the email before it is passed on to the email client. Security_MainTableSummary This table provides sets of controls that affect the security of the overall configuration of POPFile, whether it should automatically check for updates to the program, and whether statistics about POPFile's performance should be sent to the central datastore of the program's author for general information. Advanced_MainTableSummary This table provides a list of words that POPFile ignores when classifying email due to their relative frequency in email in general. They are organized per row according to the first letter of the words. --- NEW FILE: Chinese-Traditional.msg --- # Copyright (c) 2001-2003 John Graham-Cumming # Traditional Chinese Translated By Mark Wu, 2003/03/04 # Identify the language and character set used for the interface LanguageCode tw LanguageCharset big5 # This is used to get the appropriate subdirectory for the manual ManualLanguage en # Common words that are used on their own all over the interface Apply ®M¥Î On ¶} Off Ãö TurnOn ¶}±Ò TurnOff Ãö³¬ Add ¥[¤J Remove ²¾°£ Previous ¤W¤@¶ Next ¤U¤@¶ From ±H¥óªÌ Subject ¥D¦® Classification ¤ÀÃþ Reclassify «·s¤ÀÃþ Undo ´_ì Close Ãö³¬ Find ·j´M Filter ¹LÂo Yes ¬O No §_ ChangeToYes ¬O ChangeToNo §_ Bucket ¤ÀÃþ Magnet ³W«h Delete §R°£ Create «Ø¥ß To ¦¬¥óªÌ Total ¥þ³¡ Rename «·s©R¦W Frequency ÀW²v Probability ¾÷²v Score ¤À¼Æ Lookup ¬d¬Ý # The header and footer that appear on every UI page Header_Title POPFile ±±¨î¥x Header_Shutdown °±¤î POPFile Header_History ¾ú¥v Header_Buckets ¤ÀÃþ Header_Configuration ³]©w Header_Advanced ¶i¶¥ Header_Security ¦w¥þ Header_Magnets ³W«h Footer_HomePage POPFile º¶ Footer_Manual ¨Ï¥Î¤â¥U Footer_Forums ½×¾Â Footer_FeedMe ÃÙ§U Footer_RequestFeature ¥\¯à«ØÄ³ Footer_MailingList ¶l¥ó¸s²Õ Configuration_Error1 ¤À¹j¦r¤¸¥²¶·¬°³æ¤@¦r¤¸ Configuration_Error2 ¨Ï¥ÎªÌ¤¶±³s±µ°ð¥²¶·¤¶©ó 1 ¨ì 65535 ¤§¶¡ Configuration_Error3 ¤º±H¦øªA¾¹³s±µ°ð¥²¶·¤¶©ó 1 ¨ì 65535 ¤§¶¡ Configuration_Error4 ¨C¤@¶Åã¥Ü«H¥ó¼Æ¥²¶·¤¶©ó 1 ¨ì 1000 ¤§¶¡ Configuration_Error5 ¾ú¥v¬ö¿ý¤Ñ¼Æ¥²¶·¤¶©ó 1 ¨ì 366 ¤§¶¡ Configuration_Error6 TCP ³s±µ¹O®É¬í¼Æ¤¶©ó 10 ¨ì 300 ¤§¶¡ Configuration_POP3Port ¤º±H¦øªA¾¹³s±µ°ð Configuration_POP3Update §ó§ï¤º±H¦øªA¾¹³s±µ°ð¬° %s; »Ý«·s±Ò°Ê POPFile Configuration_Separator ¤À¹j¦r¤¸ Configuration_SepUpdate §ó§ï¤À¹j¦r¤¸¬° %s Configuration_UI ¨Ï¥ÎªÌ¤¶±³s±µ°ð Configuration_UIUpdate §ó§ï¨Ï¥ÎªÌ¤¶±³s±µ°ð¬° %s; »Ý«·s±Ò°Ê POPFile Configuration_History ¨C¤@¶Åã¥Ü«H¥ó¼Æ Configuration_HistoryUpdate §ó§ï¨C¤@¶Åã¥Ü«H¥ó¼Æ¬° to %s Configuration_Days ¾ú¥v¬ö¿ý¤Ñ¼Æ Configuration_DaysUpdate §ó§ï¾ú¥v¬ö¿ý¤Ñ¼Æ¬° %s Configuration_UserInterface ¨Ï¥ÎªÌ¤¶± Configuration_Skins ±ª© Configuration_SkinsChoose ¿ï¾Ü±ª© Configuration_Language »y¨¥ Configuration_LanguageChoose ¿ï¾Ü»y¨¥ Configuration_ListenPorts ³s±µ°ð Configuration_HistoryView ¾ú¥vÀ˵ø Configuration_TCPTimeout TCP ³s±µ¹O®É Configuration_TCPTimeoutSecs TCP ³s±µ¹O®É¬í¼Æ Configuration_TCPTimeoutUpdate §ó§ï TCP ³s±µ¹O®É¬° %s ¬í Configuration_ClassificationInsertion E-Mail ¤º®e×§ï Configuration_SubjectLine ¥D¦®¥[¤J[¤ÀÃþ¦WºÙ] Configuration_XTCInsertion ¥[¤J X-Text-Classification ¨ì«H¥ó¼ÐÃD¤¤ Configuration_XPLInsertion ¥[¤J X-POPFile-Link ¨ì«H¥ó¼ÐÃD¤¤ Configuration_Logging ¬ö¿ý Configuration_None µL Configuration_ToScreen ¿é¥X¨ì¿Ã¹õ Configuration_ToFile ¿é¥X¨ìÀÉ®× Configuration_ToScreenFile ¿é¥X¨ì¿Ã¹õ»PÀÉ®× Configuration_LoggerOutput °O¿ý¿é¥X¤è¦¡ Configuration_GeneralSkins ±ª© Configuration_SmallSkins ±ª©(¤p¦r§Î) Configuration_TinySkins ±ª©(°g§A¦r§Î) Advanced_Error1 '%s' ¤w¸g¦s¦b©¿²¤³æ¦r¦rªí¤¤ Advanced_Error2 ©¿²¤³æ¦r¥u¥i¥]§t^¤å,¼Æ¦r, ., _, -, ©Î @ µ¥¦r¤¸ Advanced_Error3 '%s' ¤w¸g¥[¤J©¿²¤³æ¦r¦rªí¤¤ Advanced_Error4 '%s' ¤£¦s¦b©¿²¤³æ¦r¦rªí¤¤ Advanced_Error5 '%s' ¤w¸g±q©¿²¤³æ¦r¦rªí¤¤²¾°£ Advanced_StopWords ©¿²¤³æ¦r¦rªí Advanced_Message1 POPFile ·|©¿²¤¥H¤U¥X²{ÀW²v¸û°ªªº³æ¦r: Advanced_AddWord ¥[¤J³æ¦r Advanced_RemoveWord ²¾°£³æ¦r History_Filter (Åã¥Ü¤ÀÃþ <font color="%s">%s</font>) History_FilterBy ¹LÂo±ø¥ó History_Search (·j´M±H¥óªÌ/¥D¦® %s) History_Title ³Ìªñ«H¥ó History_Jump ²¾¦Ü«H¥ó History_ShowAll ¥þ³¡Åã¥Ü History_ShouldBe À³¸Ó¬O History_NoFrom ¨S¦³±H¥óªÌ History_NoSubject ¨S¦³¥D¦® History_ClassifyAs ¤ÀÃþ¬° History_MagnetUsed ¨Ï¥Î³W«h History_ChangedTo §ïÅܬ° <font color="%s">%s History_Already ¤w¸g«·s¤ÀÃþ¬° <font color="%s">%s</font> History_RemoveAll ¥þ³¡²¾°£ History_RemovePage ²¾°£³o¤@¶ History_Remove ²¾°£¾ú¥v«H¥ó History_SearchMessage ·j´M±H¥óªÌ/¥D¦® History_NoMessages ¨S¦³¥ô¦ó°T®§ History_ShowMagnet ¨Ï¥Î³W«h History_Magnet (¥uÅã¥Ü¨Ï¥Î³W«h¤ÀÃþªº«H¥ó) History_ResetSearch «³] Password_Title ±K½X Password_Enter ¿é¤J±K½X Password_Go ¶i¤J Password_Error1 ±K½X¿ù»~ Security_Error1 ÅçÃÒ¦øªA¾¹³s±µ°ð¥²¶·¤¶©ó 1 ¨ì 65535 ¤§¶¡ Security_Stealth ³æ¾÷/¥D¾÷¼Ò¦¡³]©w Security_NoStealthMode §_ (³æ¾÷¼Ò¦¡) Security_ExplainStats (¶}±Ò³oÓ¥\¯à, ·|¨Ï POPFile ¨C¤Ñ¶Ç°e¤TÓ¯S©wªº¸ê®Æ¨ì www.usethesource.com: ¥]§t bc (©Ò¦³¤ÀÃþªºÓ¼Æ), mc (©Ò¦³ POPFile ¤ÀÃþ¹Lªº«H¥ó¼Æ) and ec (©Ò¦³ªº¤ÀÃþ¿ù»~¦¸¼Æ). §Ú·|§Q¥Î³o¨Ç¸ê®Æ¨Ó²Îp¨Ã¤ÀªR¨Ï¥ÎªÌ¦p¦ó¨ÓÀ³¥Î POPFile. §Úªººô¯¸·|±N³o¨Ç¸ê®Æ«O¯d¤¤Ñ, ¤¤Ñ«á·|¦Û°Ê±N³o¨Ç¸ê®Æ±q¸ê®Æ®w¤¤²¾°£; §Ú¨S¦³«O¯d¥ô¦ó§AªºIP¦ì§}¦b³o¨Ç¶Ç¿éªº¸ê®Æ¤¤.) Security_ExplainUpdate (¶}±Ò³oÓ¥\¯à, ·|¨Ï POPFile ¨C¤Ñ¶Ç°e¤TÓ¯S©wªº¸ê®Æ¨ì www.usethesource.com: ¥]§t ma (§A¦w¸Ëªº POPFile ªº¥Dnª©¥»), mi (§A¦w¸Ëªº POPFile ªº¦¸nª©¥») and bn (§A¦w¸Ëªº POPFile ªº«Ø¥ß¥N½X). ¦pªG POPFile ªº·sª©¦s¦b, ·|¦b POPFile ±±¨î¤¤¤ßº¶Åã¥Ü§ó·s¸ê°T. §Úªººô¯¸·|±N³o¨Ç¸ê®Æ«O¯d¤¤Ñ, ¤¤Ñ«á·|¦Û°Ê±N³o¨Ç¸ê®Æ±q¸ê®Æ®w¤¤²¾°£; §Ú¨S¦³«O¯d¥ô¦ó§AªºIP¦ì§}¦b³o¨Ç¶Ç¿éªº¸ê®Æ¤¤.) Security_PasswordTitle ¨Ï¥ÎªÌ¤¶±±K½X³]©w Security_Password ±K½X Security_PasswordUpdate §ó§ï±K½X¬° %s Security_AUTHTitle ¦w¥þ±K½XÅçÃÒ Security_SecureServer ÅçÃÒ¦øªA¾¹ Security_SecureServerUpdate §ó§ï¦w¥þ±K½XÅçÃÒ¦øªA¾¹¬° %s; »Ý«·s±Ò°Ê POPFile Security_SecurePort ÅçÃÒ¦øªA¾¹³s±µ°ð Security_SecurePortUpdate §ó§ïÅçÃÒ¦øªA¾¹³s±µ°ð¬° %s; »Ý«·s±Ò°Ê POPFile Security_POP3 ¤¹³\»·ºÝ¶}±Ò POP3 ³s½u; »Ý«·s±Ò°Ê POPFile Security_UI ¤¹³\»·ºÝ¶}±Ò HTTP ³s½u¨ì¨Ï¥ÎªÌ¤¶±; »Ý«·s±Ò°Ê POPFile Security_UpdateTitle ¦Û°Ê§ó·sÀˬd Security_Update ¨C¤ÑÀˬd POPFile ¬O§_¦³§ó·sª©¥» Security_StatsTitle ³ø§i²Îp¸ê®Æ Security_Stats ¨C¤Ñ¶Ç°e²Îp¸ê®Æ Magnet_Error1 ³W«h '%s' ¤w¸g¦s¦b¤ÀÃþ '%s' ¤¤ Magnet_Error2 ·s³W«h '%s' »P³W«h '%s' ¦b¤ÀÃþ '%s' ¤¤«½Æ¡A¥i¯à·|¾ÉP»~§P. ·s³W«h¥¼¥[¤J. Magnet_Error3 «Ø¥ß·s³W«h '%s' ¦b¤ÀÃþ '%s' ¤¤ Magnet_CurrentMagnets ²{¦³³W«h Magnet_Message1 ¥H¤Uªº³W«h·|¨Ïªº«H¥óÁ`¬OÂkÃþ¨ì¯S©wªº¤ÀÃþ¤¤. Magnet_CreateNew «Ø¥ß·s³W«h Magnet_Explanation ²{¦³¤TÓ³W«hÃþ§O:</b> <ul><li><b>±H¥óªÌªº¹q¤l¶l¥ó«H½c©Î©m¦W:</b> ¨Ò¦p: jo...@co... ¹ïÀ³¨ì¤@Ó¯S©wªº¹q¤l¶l¥ó«H½c, <br />company.com ¹ïÀ³¨ì¨C¤@Ó¨Ó¦Û©ó company.com ªº±H¥óªÌ, <br />John Doe ¹ïÀ³¨ì¤@Ó¯S©wªº©m¦W, John ¹ïÀ³¨ì¨C¤@Ó¦W¦r¤¤¦³ John ªº¤H</li><li><b>¦¬¥óªÌªº¹q¤l¶l¥ó«H½c©Î©m¦W:</b> ¦p¦P±H¥óªÌªº³W«hÃþ§O¤@¼Ë¡A¥u¬O³oÓ³W«hÃþ§O¬O°w¹ï¦¬¥óªÌ</li> <li><b>«H¥ó¥D¦®¤¤ªº¯S©w³æ¦r</b> ¨Ò¦p: hello ·|¹ïÀ³¨ì©Ò¦³«H¥ó¥D¦®¤¤¦³ hello ªº«H¥ó</li></ul> Magnet_MagnetType ³W«hÃþ§O Magnet_Value È Magnet_Always Á`¬OÂkÃþ¨ì¤ÀÃþ Bucket_Error1 ¤ÀÃþ¥u¥i¥]§t¤p¼gªº^¤å a ¨ì z ¥H¤Î - »P _ Bucket_Error2 ¤ÀÃþ %s ¤w¸g¦s¦b Bucket_Error3 ¤w¸g«Ø¥ß¤ÀÃþ %s Bucket_Error4 ½Ð¿é¤J¥¼§tªÅ¥Õªº¦r¤¸ Bucket_Error5 «·s©R¦W¤ÀÃþ %s ¬° %s Bucket_Error6 ¤w¸g§R°£¤ÀÃþ %s Bucket_Title Á`µ² Bucket_BucketName ¤ÀÃþ¦WºÙ Bucket_WordCount ¥þ³¡³æ¦r¦r¼Æ Bucket_WordCounts ¥X²{¦r¼Æ²Îp Bucket_UniqueWords «D«½Æ³æ¦r¦r¼Æ Bucket_SubjectModification ¥D¦®¥[¤J[¤ÀÃþ¦WºÙ] Bucket_ChangeColor §ó§ïÃC¦â Bucket_NotEnoughData ¨S¦³¨¬°÷¸ê®Æ Bucket_ClassificationAccuracy ¤ÀÃþ·Ç½T²v Bucket_EmailsClassified ¤w¤ÀÃþªº«H¥ó¼Æ Bucket_EmailsClassifiedUpper «H¥ó¤ÀÃþµ²ªG Bucket_ClassificationErrors ¤ÀÃþ¿ù»~¦¸¼Æ Bucket_Accuracy ·Ç½T²v Bucket_ClassificationCount «H¥ó¤ÀÃþ²Îp Bucket_ResetStatistics «³]²Îp°O¿ý Bucket_LastReset ¤W¦¸«³]®É¶¡¬° Bucket_CurrentColor %s ²{¦bÃC¦â¬O %s Bucket_SetColorTo §ó§ïÃC¦â %s ¬° %s Bucket_Maintenance ºûÅ@ Bucket_CreateBucket «Ø¥ß¤ÀÃþ Bucket_DeleteBucket §R°£¤ÀÃþ Bucket_RenameBucket «·s©R¦W¤ÀÃþ Bucket_Lookup ¬d¬Ý Bucket_LookupMessage ¬d¬Ý¤ÀÃþ¤¤ªº³æ¦r Bucket_LookupMessage2 ¬d¬Ýµ²ªG Bucket_LookupMostLikely <b>%s</b> ³Ì±`¥X²{¦b¤ÀÃþ <font color="%s">%s</font> Bucket_DoesNotAppear <p><b>%s</b> ¨S¦³¥X²{¦b¥ô¦ó¤ÀÃþ¤¤ Bucket_DisabledGlobally ¥þ³¡°±¤î Bucket_To ¬° Bucket_Quarantine ¹jÂ÷ SingleBucket_Title ¸Ô²Ó¸ê®Æ %s SingleBucket_WordCount ¤ÀÃþ¦r¼Æ²Îp SingleBucket_TotalWordCount ¥þ³¡¦r¼Æ²Îp SingleBucket_Percentage ¦û¦Ê¤À¤ñ SingleBucket_WordTable ¦rªí %s SingleBucket_Message1 ¼Ð¥Ü (*) ªº³æ¦r¥Nªí¤w³Q¨Ï¥Î¦b POPFile ³o¤@¦¸ Session ªº¤ÀÃþ¤¤. «ö¥ô¦ó¤@Ó³æ¦r¥h¬d¬Ý¥L¦b¨C¤@Ó¤ÀÃþ¤¤¥X½uªº¾÷²v. SingleBucket_Unique %s «D«½Æ Session_Title POPFile Session ¤w¸g¹L´Á Session_Error §Aªº POPFile session ¤w¸g¹L´Á. This could have been caused by starting and stopping POPFile but leaving your web browser open. Please click one of the links above to continue using POPFile. Header_MenuSummary This table is the navigation menu which allows access to each of the different pages of the control center. History_MainTableSummary This table shows the sender and subject of recently received messages and allows them to be reviewed and reclassified. Clicking on the subject line will show the full message text, along with information about why it was classified as it was. The 'Should be' column allows you to specify which bucket the message belongs in, or to undo that change. The 'Delete' column allows you to delete specific messages from the history if you don't need them anymore. History_OpenMessageSummary This table contains the full text of an email message, with the words that are used for classification highlighted according to the bucket that was most relevant for each. Bucket_MainTableSummary This table provides an overview of the classification buckets. Each row shows the bucket name, the word count total for that bucket, the actual number of individual words in each bucket, whether the email's subject line will be modified when it gets classified to that bucket, whether to quarantine the messages received in that bucket, and a table to pick the color used in displaying anything related to that bucket in the control center. Bucket_StatisticsTableSummary This table provides three sets of statistics on the overall performance of POPFile. The first is how accurate its classification is, the second is how many emails have been classified, and to which buckets, and the third is how many words are in each bucket, and what their relative percentages are. Bucket_MaintenanceTableSummary This table contains forms that allow you to create, delete or rename buckets, and to lookup a word in all of the buckets to see its relative probabilities. Bucket_AccuracyChartSummary This table graphically represents the accuracy of the email classification. Bucket_BarChartSummary This table graphically represents a percentage allocation for each of the different buckets. It is used for both number of emails classified, and total word counts. Bucket_LookupResultsSummary This table shows the probabilities associated with any given word of the corpus. For each bucket, it shows the frequency that that word occurs, the probability that it will occur in that bucket, and the overall effect on the score of the bucket if that word exists in an email. Bucket_WordListTableSummary This table provides a listing of all the words for a particular bucket, organized by common first letter for each row. Magnet_MainTableSummary This table shows the list of magnets that are used to automatically classify email according to fixed rules. Each row shows how the magnet is defined, what bucket it is intended for, and a button to delete the magnet. Configuration_MainTableSummary This table contains a number of forms to allow you to control the configuration of POPFile. Configuration_InsertionTableSummary This table contains buttons that determine whether or not certain modifications are made to the headers or subject line of the email before it is passed on to the email client. Security_MainTableSummary This table provides sets of controls that affect the security of the overall configuration of POPFile, whether it should automatically check for updates to the program, and whether statistics about POPFile's performance should be sent to the central datastore of the program's author for general information. Advanced_MainTableSummary This table provides a list of words that POPFile ignores when classifying email due to their relative frequency in email in general. They are organized per row according to the first letter of the words. |
From: <jgr...@us...> - 2003-03-03 23:14:47
|
Update of /cvsroot/popfile/engine/UI In directory sc8-pr-cvs1:/tmp/cvs-serv22945/UI Modified Files: HTML.pm Log Message: Got to the point where the absolute basics are working; i.e. if you have a POPFile setup already then you can download and get your mail classified; don't expect statistics, history or reclassification to behave yet, but we are getting closer; also MailParse and Bayes are still messing around inside each others private variables Index: HTML.pm =================================================================== RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** HTML.pm 3 Mar 2003 22:01:36 -0000 1.100 --- HTML.pm 3 Mar 2003 23:14:44 -0000 1.101 *************** *** 59,63 **** # # The history hash contains information about ALL the files stored in the history ! # folder (by default messages/) and is updated by the load_history_cache method # # Access to the history cache is formatted $self->{history}{file}{subkey} where --- 59,63 ---- # # The history hash contains information about ALL the files stored in the history ! # folder (by default messages/) and is updated by the load_history_cache__ method # # Access to the history cache is formatted $self->{history}{file}{subkey} where *************** *** 66,70 **** # The subkeys are # ! # cull Used internally by load_history_cache (see there for details) # from The address the email was from # short_from Version of from with max 40 characters --- 66,70 ---- # The subkeys are # ! # cull Used internally by load_history_cache__ (see there for details) # from The address the email was from # short_from Version of from with max 40 characters *************** *** 81,85 **** # # history_invalid is set to cause the history cache to be reloaded by a call to ! # load_history_cache, and is set by a call to invalidate_history_cache $self->{history__} = {}; --- 81,85 ---- # # history_invalid is set to cause the history cache to be reloaded by a call to ! # load_history_cache__, and is set by a call to invalidate_history_cache $self->{history__} = {}; *************** *** 134,138 **** # The default location for the message files ! $self->config_( 'msgdir', 'messages/' ); # Use the default skin --- 134,138 ---- # The default location for the message files ! $self->global_config_( 'msgdir', 'messages/' ); # Use the default skin *************** *** 214,218 **** $self->invalidate_history_cache(); ! $self->load_history_cache(); $self->sort_filter_history( '', '', '' ); --- 214,218 ---- $self->invalidate_history_cache(); ! $self->load_history_cache__(); $self->sort_filter_history( '', '', '' ); *************** *** 2014,2022 **** my $bm; ! if ( $a =~ /popfile(.*)=(.*)\.msg/ ) { $ad = $1; $am = $2; ! if ( $b =~ /popfile(.*)=(.*)\.msg/ ) { $bd = $1; $bm = $2; --- 2014,2022 ---- my $bm; ! if ( $a =~ /popfile(.+)=(.+)\.msg/ ) { $ad = $1; $am = $2; ! if ( $b =~ /popfile(.+)=(.+)\.msg/ ) { $bd = $1; $bm = $2; *************** *** 2118,2122 **** # --------------------------------------------------------------------------------------------- # ! # load_history_cache # # Forces a reload of the history cache from disk. This works by globbing the history --- 2118,2122 ---- # --------------------------------------------------------------------------------------------- # ! # load_history_cache__ # # Forces a reload of the history cache from disk. This works by globbing the history *************** *** 2125,2129 **** # # --------------------------------------------------------------------------------------------- ! sub load_history_cache { my ( $self ) = @_; --- 2125,2129 ---- # # --------------------------------------------------------------------------------------------- ! sub load_history_cache__ { my ( $self ) = @_; *************** *** 2146,2150 **** # for non-culling and new entries that need to be added to the end ! my @history_files = sort compare_mf glob $self->config_( 'msgdir' ) . "popfile*=*.msg"; foreach my $i ( 0 .. $#history_files ) { --- 2146,2150 ---- # for non-culling and new entries that need to be added to the end ! my @history_files = sort compare_mf glob $self->global_config_( 'msgdir' ) . "popfile*=*.msg"; foreach my $i ( 0 .. $#history_files ) { *************** *** 2153,2157 **** # just get the base name of the file that we are dealing with ! $history_files[$i] =~ /(popfile.*\.msg)/; $history_files[$i] = $1; --- 2153,2157 ---- # just get the base name of the file that we are dealing with ! $history_files[$i] =~ /(popfile\d+=\d+\.msg)$/; $history_files[$i] = $1; *************** *** 2170,2174 **** my $subject = ''; ! if ( open MAIL, '<'. $self->config_( 'msgdir' ) . "$history_files[$i]" ) { while ( <MAIL> ) { last if ( /^(\r\n|\r|\n)/ ); --- 2170,2174 ---- my $subject = ''; ! if ( open MAIL, '<'. $self->global_config_( 'msgdir' ) . "$history_files[$i]" ) { while ( <MAIL> ) { last if ( /^(\r\n|\r|\n)/ ); *************** *** 2337,2341 **** $filename =~ s/msg$/cls/; ! open CLASS, '>' . $self->config_( 'msgdir' ) . $filename; if ( defined( $magnet ) && ( $magnet ne '' ) ) { --- 2337,2341 ---- $filename =~ s/msg$/cls/; ! open CLASS, '>' . $self->global_config_( 'msgdir' ) . $filename; if ( defined( $magnet ) && ( $magnet ne '' ) ) { *************** *** 2378,2382 **** my $magnet = ''; ! if ( open CLASS, '<' . $self->config_( 'msgdir' ) . $filename ) { $bucket = <CLASS>; if ( $bucket =~ /([^ ]+) MAGNET (.+)/ ) { --- 2378,2382 ---- my $magnet = ''; ! if ( open CLASS, '<' . $self->global_config_( 'msgdir' ) . $filename ) { $bucket = <CLASS>; if ( $bucket =~ /([^ ]+) MAGNET (.+)/ ) { *************** *** 2395,2399 **** $bucket =~ s/[\r\n]//g; } else { ! print "Error: " . $self->config_( 'msgdir' ) . "$filename: $!\n"; } return ( $reclassified, $bucket, $usedtobe, $magnet ); --- 2395,2399 ---- $bucket =~ s/[\r\n]//g; } else { ! print "Error: " . $self->global_config_( 'msgdir' ) . "$filename: $!\n"; } return ( $reclassified, $bucket, $usedtobe, $magnet ); *************** *** 2475,2479 **** # Parse the messages and tally the word-count ! $self->{classifier__}->{parser}->parse_stream( $self->config_( 'msgdir' ) . "$mail_file" ); foreach my $word (keys %{$self->{classifier__}->{parser}->{words}}) { --- 2475,2479 ---- # Parse the messages and tally the word-count ! $self->{classifier__}->{parser}->parse_stream( $self->global_config_( 'msgdir' ) . "$mail_file" ); foreach my $word (keys %{$self->{classifier__}->{parser}->{words}}) { *************** *** 2568,2572 **** } ! $self->{classifier__}->{parser}->parse_stream($self->config_( 'msgdir' ) . "$mail_file"); # Tally the words --- 2568,2572 ---- } ! $self->{classifier__}->{parser}->parse_stream($self->global_config_( 'msgdir' ) . "$mail_file"); # Tally the words *************** *** 2760,2764 **** # applied. The watch word here is to avoid doing work ! $self->load_history_cache() if ( $self->{history_invalid__} == 1 ); $self->sort_filter_history( $self->{form__}{filter}, $self->{form__}{search}, --- 2760,2764 ---- # applied. The watch word here is to avoid doing work ! $self->load_history_cache__() if ( $self->{history_invalid__} == 1 ); $self->sort_filter_history( $self->{form__}{filter}, $self->{form__}{search}, *************** *** 2963,2967 **** $self->{classifier__}->{parser}->{color} = 1; $self->{classifier__}->{parser}->{bayes} = $self->{classifier__}; ! $body .= $self->{classifier__}->{parser}->parse_stream($self->config_( 'msgdir' ) . "$self->{form__}{view}"); $self->{classifier__}->{parser}->{color} = 0; } else { --- 2963,2967 ---- $self->{classifier__}->{parser}->{color} = 1; $self->{classifier__}->{parser}->{bayes} = $self->{classifier__}; ! $body .= $self->{classifier__}->{parser}->parse_stream($self->global_config_( 'msgdir' ) . "$self->{form__}{view}"); $self->{classifier__}->{parser}->{color} = 0; } else { *************** *** 2971,2975 **** $body .= "<tt>"; ! open MESSAGE, "<$self->config_( 'msgdir' )$self->{form__}{view}"; my $line; # process each line of the message --- 2971,2975 ---- $body .= "<tt>"; ! open MESSAGE, '<' . $self->global_config_( 'msgdir' ) . "$self->{form__}{view}"; my $line; # process each line of the message *************** *** 3009,3013 **** $body .= "<td class=\"top20\" valign=\"top\">\n"; ! $self->{classifier__}->classify_file($self->config_( 'msgdir' ) . "$self->{form__}{view}"); $body .= $self->{classifier__}->{scores}; $body .= "</td>\n</tr>\n"; --- 3009,3013 ---- $body .= "<td class=\"top20\" valign=\"top\">\n"; ! $self->{classifier__}->classify_file($self->global_config_( 'msgdir' ) . "$self->{form__}{view}"); $body .= $self->{classifier__}->{scores}; $body .= "</td>\n</tr>\n"; *************** *** 3188,3192 **** # true if the file exists). ! $self->invalidate_history_cache() if ( !$found && ( -e ($self->config_( 'msgdir' ) . "$file") ) ); $self->http_redirect( $client, "/history?session=$self->{session_key__}&start_message=0&view=$self->{form__}{view}#$self->{form__}{view}" ); return 1; --- 3188,3192 ---- # true if the file exists). ! $self->invalidate_history_cache() if ( !$found && ( -e ($self->global_config_( 'msgdir' ) . "$file") ) ); $self->http_redirect( $client, "/history?session=$self->{session_key__}&start_message=0&view=$self->{form__}{view}#$self->{form__}{view}" ); return 1; *************** *** 3363,3367 **** if ( $self->{today} > $yesterday ) { ! my @mail_files = glob $self->config_( 'msgdir' ) . "popfile*=*.msg"; foreach my $mail_file (@mail_files) { --- 3363,3367 ---- if ( $self->{today} > $yesterday ) { ! my @mail_files = glob $self->global_config_( 'msgdir' ) . "popfile*=*.msg"; foreach my $mail_file (@mail_files) { *************** *** 3375,3379 **** # Clean up old style msg/cls files ! @mail_files = glob $self->config_( 'msgdir' ) . "popfile*_*.???"; foreach my $mail_file (@mail_files) { --- 3375,3379 ---- # Clean up old style msg/cls files ! @mail_files = glob $self->global_config_( 'msgdir' ) . "popfile*_*.???"; foreach my $mail_file (@mail_files) { *************** *** 3433,3437 **** # why this might be unsafe. What does unsafe mean in this context? ! $self->history_copy_file( $self->config_( 'msgdir' ) . "$mail_file", $path, $mail_file ); } } --- 3433,3437 ---- # why this might be unsafe. What does unsafe mean in this context? ! $self->history_copy_file( $self->global_config_( 'msgdir' ) . "$mail_file", $path, $mail_file ); } } *************** *** 3445,3451 **** # the mail message and its associated CLS file ! unlink( $self->config_( 'msgdir' ) . "$mail_file" ); $mail_file =~ s/msg$/cls/; ! unlink( $self->config_( 'msgdir' ) . "$mail_file" ); } --- 3445,3451 ---- # the mail message and its associated CLS file ! unlink( $self->global_config_( 'msgdir' ) . "$mail_file" ); $mail_file =~ s/msg$/cls/; ! unlink( $self->global_config_( 'msgdir' ) . "$mail_file" ); } |
From: <jgr...@us...> - 2003-03-03 23:14:46
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1:/tmp/cvs-serv22945/Proxy Modified Files: POP3.pm Log Message: Got to the point where the absolute basics are working; i.e. if you have a POPFile setup already then you can download and get your mail classified; don't expect statistics, history or reclassification to behave yet, but we are getting closer; also MailParse and Bayes are still messing around inside each others private variables Index: POP3.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** POP3.pm 3 Mar 2003 22:01:35 -0000 1.42 --- POP3.pm 3 Mar 2003 23:14:43 -0000 1.43 *************** *** 56,68 **** $self->config_( 'port', 110 ); - # Subject modification (global setting is on) - $self->config_( 'subject', 1 ); - - # Adding the X-Text-Classification on - $self->config_( 'xtc', 1 ); - - # Adding the X-POPFile-Link is no - $self->config_( 'xpl', 1 ); - # There is no default setting for the secure server $self->config_( 'server', '' ); --- 56,59 ---- |
From: <jgr...@us...> - 2003-03-03 23:14:46
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1:/tmp/cvs-serv22945/POPFile Modified Files: Module.pm Log Message: Got to the point where the absolute basics are working; i.e. if you have a POPFile setup already then you can download and get your mail classified; don't expect statistics, history or reclassification to behave yet, but we are getting closer; also MailParse and Bayes are still messing around inside each others private variables Index: Module.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Module.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Module.pm 3 Mar 2003 22:01:35 -0000 1.3 --- Module.pm 3 Mar 2003 23:14:43 -0000 1.4 *************** *** 247,250 **** --- 247,270 ---- } + # --------------------------------------------------------------------------------------------- + # + # global_config_ + # + # Called by a subclass to get or set a global (i.e. not module specific) configuration parameter + # + # $name The name of the parameter (e.g. 'port') + # $value (optional) The value to set + # + # If called with just a $name then global_config_() will return the current value + # of the configuration parameter. + # + # --------------------------------------------------------------------------------------------- + sub global_config_ + { + my ( $self, $name, $value ) = @_; + + return $self->{configuration__}->parameter( "GLOBAL_$name", $value ); + } + # GETTER/SETTER methods. Note that I do not expect documentation of these unless they # are non-trivial since the documentation would be a waste of space |
From: <jgr...@us...> - 2003-03-03 23:14:46
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1:/tmp/cvs-serv22945/Classifier Modified Files: Bayes.pm Log Message: Got to the point where the absolute basics are working; i.e. if you have a POPFile setup already then you can download and get your mail classified; don't expect statistics, history or reclassification to behave yet, but we are getting closer; also MailParse and Bayes are still messing around inside each others private variables Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** Bayes.pm 3 Mar 2003 22:01:30 -0000 1.109 --- Bayes.pm 3 Mar 2003 23:14:37 -0000 1.110 *************** *** 110,113 **** --- 110,122 ---- my ( $self ) = @_; + # Subject modification (global setting is on) + $self->config_( 'subject', 1 ); + + # Adding the X-Text-Classification on + $self->config_( 'xtc', 1 ); + + # Adding the X-POPFile-Link is no + $self->config_( 'xpl', 1 ); + # No default unclassified probability $self->config_( 'unclassified_probability', 0 ); *************** *** 525,529 **** # If the user has not defined any buckets then we escape here return unclassified ! return "unclassified " if ( $#buckets == -1 ); # The score hash will contain the likelihood that the given message is in each --- 534,538 ---- # If the user has not defined any buckets then we escape here return unclassified ! return "unclassified" if ( $#buckets == -1 ); # The score hash will contain the likelihood that the given message is in each *************** *** 560,564 **** # Switching from using *= to += and using the log of every probability instead ! foreach my $word (keys %{$self->{parser__}->{words}}) { my $wmax = -10000; if ($self->{wordscores__}) { --- 569,573 ---- # Switching from using *= to += and using the log of every probability instead ! foreach my $word (keys %{$self->{parser__}->{words__}}) { my $wmax = -10000; if ($self->{wordscores__}) { *************** *** 576,580 **** # and we multiply by the number of times that the word occurs ! $score{$bucket} += ( $probability * $self->{parser__}{words}{$word} ); if ($self->{wordscores__}) { $wtprob{$word} += exp($probability); --- 585,589 ---- # and we multiply by the number of times that the word occurs ! $score{$bucket} += ( $probability * $self->{parser__}{words__}{$word} ); if ($self->{wordscores__}) { $wtprob{$word} += exp($probability); *************** *** 584,590 **** if ($wmax > $self->{not_likely__}) { ! $correction += ($wmax - $logbuck) * $self->{parser__}{words}{$word}; } else { ! $correction += $wmax * $self->{parser__}{words}{$word}; } $wordprob{$word} = exp($wmax); --- 593,599 ---- if ($wmax > $self->{not_likely__}) { ! $correction += ($wmax - $logbuck) * $self->{parser__}{words__}{$word}; } else { ! $correction += $wmax * $self->{parser__}{words__}{$word}; } $wordprob{$word} = exp($wmax); *************** *** 713,718 **** my $getting_headers = 1; ! my $temp_file = "$self->config_( 'msgdir' )popfile$dcount" . "=$mcount.msg"; ! my $class_file = "$self->config_( 'msgdir' )popfile$dcount" . "=$mcount.cls"; open TEMP, ">$temp_file"; --- 722,727 ---- my $getting_headers = 1; ! my $temp_file = $self->global_config_( 'msgdir' ) . "popfile$dcount" . "=$mcount.msg"; ! my $class_file = $self->global_config_( 'msgdir' ) . "popfile$dcount" . "=$mcount.cls"; open TEMP, ">$temp_file"; |
From: <ssc...@us...> - 2003-03-03 22:09:20
|
Update of /cvsroot/popfile/engine In directory sc8-pr-cvs1:/tmp/cvs-serv23301 Modified Files: Tag: v0/18/1 popfile.pl Log Message: update minor version number in 0.18.x branch Index: popfile.pl =================================================================== RCS file: /cvsroot/popfile/engine/popfile.pl,v retrieving revision 1.204 retrieving revision 1.204.2.1 diff -C2 -d -r1.204 -r1.204.2.1 *** popfile.pl 25 Feb 2003 22:17:40 -0000 1.204 --- popfile.pl 3 Mar 2003 22:09:11 -0000 1.204.2.1 *************** *** 285,289 **** $components{core}{config}->{major_version} = 0; $components{core}{config}->{minor_version} = 18; ! $components{core}{config}->{build_version} = 1; print "\nPOPFile Engine v$components{core}{config}->{major_version}.$components{core}{config}->{minor_version}.$components{core}{config}->{build_version} starting"; --- 285,289 ---- $components{core}{config}->{major_version} = 0; $components{core}{config}->{minor_version} = 18; ! $components{core}{config}->{build_version} = 2; print "\nPOPFile Engine v$components{core}{config}->{major_version}.$components{core}{config}->{minor_version}.$components{core}{config}->{build_version} starting"; |
From: <jgr...@us...> - 2003-03-03 22:02:09
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1:/tmp/cvs-serv19388/POPFile Modified Files: Configuration.pm Logger.pm Module.pm Log Message: Fix up the constructors so that they call the parent classes, add new parameter method to POPFile::Configuration, fix up calls to child and flush_child_data for proxies; various other minor tweaks. With this commit POPFile OO is limping along... my guess is the next commit and you'll be able to try it out Index: Configuration.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Configuration.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Configuration.pm 3 Mar 2003 15:21:44 -0000 1.8 --- Configuration.pm 3 Mar 2003 22:01:32 -0000 1.9 *************** *** 28,41 **** { my $type = shift; ! my $self; ! # All the current configuration parameters are stored in this hash which # is intended to be globally accessed by modules that make use of this module, # to register a configuration default entries are made in this hash in the form # ! # $self->{configuration}{parameter} ! $self->{configuration} = {}; ! ! return bless $self, $type; } --- 28,45 ---- { my $type = shift; ! my $self = POPFile::Module->new(); ! # All the current configuration parameters are stored in this hash which # is intended to be globally accessed by modules that make use of this module, # to register a configuration default entries are made in this hash in the form # ! # $self->{configuration_parameters__}{parameter} ! $self->{configuration_parameters__} = {}; ! ! bless $self, $type; ! ! $self->name( 'config' ); ! ! return $self; } *************** *** 53,59 **** # This is the location where we store the PID of POPFile in a file # called popfile.pid ! ! $self->{configuration}{piddir} = './'; ! return 1; } --- 57,63 ---- # This is the location where we store the PID of POPFile in a file # called popfile.pid ! ! $self->config_( 'piddir', './' ); ! return 1; } *************** *** 70,74 **** my ( $self ) = @_; ! if ( open PID, ">$self->{configuration}{piddir}popfile.pid" ) { print PID "$$\n"; close PID; --- 74,78 ---- my ( $self ) = @_; ! if ( open PID, '>' . $self->config_( 'piddir' ) . 'popfile.pid' ) { print PID "$$\n"; close PID; *************** *** 88,144 **** { my ( $self ) = @_; - - unlink( "$self->{configuration}{piddir}popfile.pid" ); - } ! # --------------------------------------------------------------------------------------------- ! # ! # name ! # ! # Called to get the simple name for this module ! # ! # --------------------------------------------------------------------------------------------- ! sub name ! { ! my ( $self ) = @_; ! ! return 'config'; ! } ! ! # --------------------------------------------------------------------------------------------- ! # ! # service ! # ! # ! # --------------------------------------------------------------------------------------------- ! sub service ! { ! my ( $self ) = @_; ! ! return 1; ! } ! ! # --------------------------------------------------------------------------------------------- ! # ! # forked ! # ! # Called when someone forks POPFile ! # ! # --------------------------------------------------------------------------------------------- ! sub forked ! { ! my ( $self ) = @_; ! } ! ! # --------------------------------------------------------------------------------------------- ! # ! # reaper ! # ! # Called to reap our dead children ! # ! # --------------------------------------------------------------------------------------------- ! sub reaper ! { ! my ( $self ) = @_; } --- 92,97 ---- { my ( $self ) = @_; ! unlink( $self->config_( 'piddir' ) . 'popfile.pid' ); } *************** *** 152,156 **** # # --------------------------------------------------------------------------------------------- ! sub parse_command_line { my ( $self ) = @_; --- 105,109 ---- # # --------------------------------------------------------------------------------------------- ! sub parse_command_line { my ( $self ) = @_; *************** *** 159,173 **** # the default values defined at the start of the code and those read from the configuration # file ! if ( $#ARGV >= 0 ) { my $i = 0; ! while ( $i < $#ARGV ) { # A command line argument must start with a - ! if ( $ARGV[$i] =~ /^-(.+)$/ ) { ! if ( defined($self->{configuration}{$1}) ) { if ( $i < $#ARGV ) { ! $self->{configuration}{$1} = $ARGV[$i+1]; $i += 2; } else { --- 112,126 ---- # the default values defined at the start of the code and those read from the configuration # file ! if ( $#ARGV >= 0 ) { my $i = 0; ! while ( $i < $#ARGV ) { # A command line argument must start with a - ! if ( $ARGV[$i] =~ /^-(.+)$/ ) { ! if ( defined($self->{configuration_parameters__}{$1}) ) { if ( $i < $#ARGV ) { ! $self->{configuration_parameters__}{$1} = $ARGV[$i+1]; $i += 2; } else { *************** *** 195,210 **** # # --------------------------------------------------------------------------------------------- ! sub load_configuration { my ( $self ) = @_; ! if ( open CONFIG, "<popfile.cfg" ) { while ( <CONFIG> ) { s/(\015|\012)//g; if ( /(\S+) (.+)/ ) { ! $self->{configuration}{$1} = $2; } } ! close CONFIG; } --- 148,163 ---- # # --------------------------------------------------------------------------------------------- ! sub load_configuration { my ( $self ) = @_; ! if ( open CONFIG, "<popfile.cfg" ) { while ( <CONFIG> ) { s/(\015|\012)//g; if ( /(\S+) (.+)/ ) { ! $self->{configuration_parameters__}{$1} = $2; } } ! close CONFIG; } *************** *** 218,235 **** # # --------------------------------------------------------------------------------------------- ! sub save_configuration { my ( $self ) = @_; if ( open CONFIG, ">popfile.cfg" ) { ! foreach my $key (keys %{$self->{configuration}}) { ! print CONFIG "$key $self->{configuration}{$key}\n"; } ! close CONFIG; } ! # TODO work out where this actually needs to be called ! # $classifier->write_parameters(); } --- 171,208 ---- # # --------------------------------------------------------------------------------------------- ! sub save_configuration { my ( $self ) = @_; if ( open CONFIG, ">popfile.cfg" ) { ! foreach my $key (keys %{$self->{configuration_parameters__}}) { ! print CONFIG "$key $self->{configuration_parameters__}{$key}\n"; } ! close CONFIG; } + } ! # --------------------------------------------------------------------------------------------- ! # ! # parameter ! # ! # Gets or sets a parameter ! # ! # $name Name of the parameter to get or set ! # $value Optional value to set the parameter to ! # ! # Always returns the current value of the parameter ! # ! # --------------------------------------------------------------------------------------------- ! sub parameter ! { ! my ( $self, $name, $value ) = @_; ! ! if ( defined( $value ) ) { ! $self->{configuration_parameters__}{$name} = $value; ! } ! ! return $self->{configuration_parameters__}{$name}; } Index: Logger.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Logger.pm 3 Mar 2003 15:21:45 -0000 1.9 --- Logger.pm 3 Mar 2003 22:01:33 -0000 1.10 *************** *** 28,39 **** sub new { ! my $proto = shift; my $class = ref($proto) || $proto; ! my $self = {}; # The name of the debug file ! $self->{debug_filename} = ''; ! bless($self, $class); return $self; } --- 28,42 ---- sub new { ! my $proto = shift; my $class = ref($proto) || $proto; ! my $self = POPFile::Module->new(); # The name of the debug file ! $self->{debug_filename__} = ''; ! bless($self, $class); + + $self->name( 'logger' ); + return $self; } *************** *** 51,74 **** # Start with debugging to file ! $self->{configuration}->{configuration}{debug} = 1; # The default location for log files ! $self->{configuration}->{configuration}{logdir} = './'; remove_debug_files( $self ); - - return 1; - } - - # --------------------------------------------------------------------------------------------- - # - # start - # - # Called to start this module - # - # --------------------------------------------------------------------------------------------- - sub start - { - my ( $self ) = @_; return 1; --- 54,63 ---- # Start with debugging to file ! $self->config_( 'debug', 1 ); # The default location for log files ! $self->config_( 'logdir', './' ); remove_debug_files( $self ); return 1; *************** *** 77,106 **** # --------------------------------------------------------------------------------------------- # - # stop - # - # Called to shutdown this module - # - # --------------------------------------------------------------------------------------------- - sub stop - { - my ( $self ) = @_; - } - - # --------------------------------------------------------------------------------------------- - # - # name - # - # Called to get the simple name for this module - # - # --------------------------------------------------------------------------------------------- - sub name - { - my ( $self ) = @_; - - return 'logger'; - } - - # --------------------------------------------------------------------------------------------- - # # service # --- 66,69 ---- *************** *** 118,145 **** # --------------------------------------------------------------------------------------------- # - # forked - # - # Called when someone forks POPFile - # - # --------------------------------------------------------------------------------------------- - sub forked - { - my ( $self ) = @_; - } - - # --------------------------------------------------------------------------------------------- - # - # reaper - # - # Called to reap our dead children - # - # --------------------------------------------------------------------------------------------- - sub reaper - { - my ( $self ) = @_; - } - - # --------------------------------------------------------------------------------------------- - # # remove_debug_files # --- 81,84 ---- *************** *** 150,159 **** { my ( $self ) = @_; - - my $yesterday = defined($self->{today})?$self->{today}:0; - calculate_today( $self ); ! if ( $self->{today} > $yesterday ) { ! my @debug_files = glob "$self->{configuration}->{configuration}{logdir}popfile*.log"; foreach my $debug_file (@debug_files) { --- 89,98 ---- { my ( $self ) = @_; ! my $yesterday = defined($self->{today__})?$self->{today__}:0; ! calculate_today__( $self ); ! ! if ( $self->{today__} > $yesterday ) { ! my @debug_files = glob $self->config_( 'logdir' ) . 'popfile*.log'; foreach my $debug_file (@debug_files) { *************** *** 172,182 **** # # --------------------------------------------------------------------------------------------- ! sub calculate_today { my ( $self ) = @_; ! # Create the name of the debug file for the debug() function ! $self->{today} = int( time / $seconds_per_day ) * $seconds_per_day; ! $self->{debug_filename} = "$self->{configuration}->{configuration}{logdir}popfile$self->{today}.log"; } --- 111,121 ---- # # --------------------------------------------------------------------------------------------- ! sub calculate_today__ { my ( $self ) = @_; ! # Create the name of the debug file for the debug() function ! $self->{today__} = int( time / $seconds_per_day ) * $seconds_per_day; ! $self->{debug_filename__} = $self->config_( 'logdir' ) . "popfile$self->{today__}.log"; } *************** *** 190,198 **** # # --------------------------------------------------------------------------------------------- ! sub debug { my ( $self, $message ) = @_; ! ! if ( $self->{configuration}->{configuration}{debug} > 0 ) { # Check to see if we are handling the USER/PASS command and if we are then obscure the # account information --- 129,137 ---- # # --------------------------------------------------------------------------------------------- ! sub debug { my ( $self, $message ) = @_; ! ! if ( $self->config_( 'debug' ) > 0 ) { # Check to see if we are handling the USER/PASS command and if we are then obscure the # account information *************** *** 203,215 **** my $now = localtime; my $msg = "$now ($$): $message"; ! ! if ( $self->{configuration}->{configuration}{debug} & 1 ) { ! open DEBUG, ">>$self->{debug_filename}"; binmode DEBUG; print DEBUG $msg; close DEBUG; } ! ! print $msg if ( $self->{configuration}->{configuration}{debug} & 2 ); } } --- 142,154 ---- my $now = localtime; my $msg = "$now ($$): $message"; ! ! if ( $self->config_( 'debug' ) & 1 ) { ! open DEBUG, ">>$self->{debug_filename__}"; binmode DEBUG; print DEBUG $msg; close DEBUG; } ! ! print $msg if ( $self->config_( 'debug' ) & 2 ); } } Index: Module.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Module.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Module.pm 3 Mar 2003 15:21:46 -0000 1.2 --- Module.pm 3 Mar 2003 22:01:35 -0000 1.3 *************** *** 224,228 **** my ( $self, $message ) = @_; ! $self->{logger__}->debug( $self->{name__} . ':' . $message ); } --- 224,228 ---- my ( $self, $message ) = @_; ! $self->{logger__}->debug( $self->{name__} . ': ' . $message ); } *************** *** 235,272 **** # $name The name of the parameter (e.g. 'port') # $value (optional) The value to set - # $short_name 1 if the $name should be registered in short form as well # # If called with just a $name then config_() will return the current value ! # of the configuration parameter. ! # ! # Short vs Long Names. All configuration parameters are identified by their ! # long name which consists of the individual parameter name preceded by the ! # module name (underscore is used as the separator). For compatbility with ! # older versions of POPFile the configuration module will also recognize some ! # short names (i.e. without the preceding name and underscore) and map automaticall ! # to the long name ! # ! # Example: POP3 registers a parameter for its listen port call port, this is stored ! # in the configuration as pop3_port. POP3 also registers for the short name version ! # which is simply port. When loading the configuration either will be accepted. ! # ! # Note NO NEW PARAMETERS should use short form # # --------------------------------------------------------------------------------------------- sub config_ { ! my ( $self, $name, $value, $short_name ) = @_; ! ! my $long_name = $self->{name__} . '_' . $name; ! ! if ( defined( $value ) ) { ! $self->{configuration__}->{configuration}{$long_name} = $value; ! ! if ( defined( $short_name ) ) { ! $self->{configuration__}->{configuration}{$name} = $value; ! } ! } ! return $self->{configuration__}->{configuration}{$long_name}; } --- 235,248 ---- # $name The name of the parameter (e.g. 'port') # $value (optional) The value to set # # If called with just a $name then config_() will return the current value ! # of the configuration parameter. # # --------------------------------------------------------------------------------------------- sub config_ { ! my ( $self, $name, $value ) = @_; ! return $self->{configuration__}->parameter( $self->{name__} . '_' . $name, $value ); } |
From: <jgr...@us...> - 2003-03-03 22:02:09
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1:/tmp/cvs-serv19388/Proxy Modified Files: POP3.pm Log Message: Fix up the constructors so that they call the parent classes, add new parameter method to POPFile::Configuration, fix up calls to child and flush_child_data for proxies; various other minor tweaks. With this commit POPFile OO is limping along... my guess is the next commit and you'll be able to try it out Index: POP3.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** POP3.pm 3 Mar 2003 15:21:46 -0000 1.41 --- POP3.pm 3 Mar 2003 22:01:35 -0000 1.42 *************** *** 28,32 **** { my $type = shift; ! my $self = {}; # Must call bless before attempting to call any methods --- 28,32 ---- { my $type = shift; ! my $self = Proxy::Proxy->new(); # Must call bless before attempting to call any methods *************** *** 36,39 **** --- 36,42 ---- $self->name( 'pop3' ); + $self->{child_} = \&child__; + $self->{flush_child_data_} = \&flush_child_data__; + return $self; } *************** *** 51,81 **** # Default ports for POP3 service and the user interface ! $self->config_( 'port', 110, 1 ); # Subject modification (global setting is on) ! $self->config_( 'subject', 1, 1 ); # Adding the X-Text-Classification on ! $self->config_( 'xtc', 1, 1 ); # Adding the X-POPFile-Link is no ! $self->config_( 'xpl', 1, 1 ); # There is no default setting for the secure server ! $self->config_( 'server', '', 1 ); ! $self->config_( 'sport', 110, 1 ); # The default timeout in seconds for POP3 commands ! $self->config_( 'timeout', 60, 1 ); # Only accept connections from the local machine for POP3 ! $self->config_( 'local', 1, 1 ); # TODO localpop # Whether to do classification on TOP as well ! $self->config_( 'toptoo', 0, 1 ); # Start with no messages downloaded and no error ! $self->config_( 'mcount', 0, 1 ); ! $self->config_( 'ecount', 0, 1 ); # This counter is used when creating unique IDs for message stored --- 54,84 ---- # Default ports for POP3 service and the user interface ! $self->config_( 'port', 110 ); # Subject modification (global setting is on) ! $self->config_( 'subject', 1 ); # Adding the X-Text-Classification on ! $self->config_( 'xtc', 1 ); # Adding the X-POPFile-Link is no ! $self->config_( 'xpl', 1 ); # There is no default setting for the secure server ! $self->config_( 'server', '' ); ! $self->config_( 'sport', 110 ); # The default timeout in seconds for POP3 commands ! $self->config_( 'timeout', 60 ); # Only accept connections from the local machine for POP3 ! $self->config_( 'local', 1 ); # TODO localpop # Whether to do classification on TOP as well ! $self->config_( 'toptoo', 0 ); # Start with no messages downloaded and no error ! $self->config_( 'mcount', 0 ); ! $self->config_( 'ecount', 0 ); # This counter is used when creating unique IDs for message stored *************** *** 87,94 **** # message_count is a local counter within that download, for sorting # purposes must sort on download_count and then message_count ! $self->config_( 'download_count', 0, 1 ); # The separator within the POP3 username is : ! $self->config_( 'separator', ':', 1 ); return 1; --- 90,97 ---- # message_count is a local counter within that download, for sorting # purposes must sort on download_count and then message_count ! $self->config_( 'download_count', 0 ); # The separator within the POP3 username is : ! $self->config_( 'separator', ':' ); return 1; *************** *** 97,101 **** # --------------------------------------------------------------------------------------------- # ! # flush_child_data # # Called to flush data from the pipe of each child as we go, I did this because there --- 100,104 ---- # --------------------------------------------------------------------------------------------- # ! # flush_child_data__ # # Called to flush data from the pipe of each child as we go, I did this because there *************** *** 108,112 **** # # --------------------------------------------------------------------------------------------- ! sub flush_child_data { my ( $self, $kid, $handle ) = @_; --- 111,115 ---- # # --------------------------------------------------------------------------------------------- ! sub flush_child_data__ { my ( $self, $kid, $handle ) = @_; *************** *** 121,125 **** $class =~ s/[\r\n]//g; ! $self->{classifier__}->{parameters}{$class}{count} += 1; $self->config_( 'mcount' ) += 1; $stats_changed = 1; --- 124,128 ---- $class =~ s/[\r\n]//g; ! # TODO $self->{classifier__}->{parameters}{$class}{count} += 1; $self->config_( 'mcount' ) += 1; $stats_changed = 1; *************** *** 145,149 **** # --------------------------------------------------------------------------------------------- # ! # child # # The worker method that is called when we get a good connection from a client --- 148,152 ---- # --------------------------------------------------------------------------------------------- # ! # child__ # # The worker method that is called when we get a good connection from a client *************** *** 153,157 **** # # --------------------------------------------------------------------------------------------- ! sub child { my ( $self, $client, $download_count, $pipe ) = @_; --- 156,160 ---- # # --------------------------------------------------------------------------------------------- ! sub child__ { my ( $self, $client, $download_count, $pipe ) = @_; *************** *** 164,168 **** # Tell the client that we are ready for commands and identify our version number ! $self->tee_( $client, "+OK POP3 POPFile (v$self->{configuration}->{major_version}.$self->{configuration}->{minor_version}.$self->{configuration}->{build_version}) server ready$eol" ); # Retrieve commands from the client and process them until the client disconnects or --- 167,171 ---- # Tell the client that we are ready for commands and identify our version number ! $self->tee_( $client, "+OK POP3 POPFile (vTODO.TODO.TODO) server ready$eol" ); # Retrieve commands from the client and process them until the client disconnects or *************** *** 184,193 **** # will pull email from. Doing this means we can act as a proxy for multiple mail clients # and mail accounts ! if ( $command =~ /USER (.+)(:(\d+))?$self->config_( 'separator' )(.+)/i ) { if ( $1 ne '' ) { ! if ( $mail = verify_connected( $self, $mail, $client, $1, $3 || 110 ) ) { # Pass through the USER command with the actual user name for this server, # and send the reply straight to the client ! echo_response( $self, $mail, $client, 'USER ' . $4 ); } else { last; --- 187,197 ---- # will pull email from. Doing this means we can act as a proxy for multiple mail clients # and mail accounts ! my $user_command = 'USER (.+)(:(\d+))?' . $self->config_( 'separator' ) . '(.+)'; ! if ( $command =~ /$user_command/i ) { if ( $1 ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $1, $3 || 110 ) ) { # Pass through the USER command with the actual user name for this server, # and send the reply straight to the client ! $self->echo_response_($mail, $client, 'USER ' . $4 ); } else { last; *************** *** 198,202 **** } ! flush_extra( $self, $mail, $client, 0 ); next; } --- 202,206 ---- } ! $self->flush_extra_( $mail, $client, 0 ); next; } *************** *** 204,216 **** # User is issuing the APOP command to start a session with the remote server if ( $command =~ /APOP (.*):((.*):)?(.*) (.*)/i ) { ! if ( $mail = verify_connected( $self, $mail, $client, $1, $3 || 110 ) ) { # Pass through the USER command with the actual user name for this server, # and send the reply straight to the client ! echo_response( $self, $mail, $client, "APOP $4 $5" ); } else { last; } ! flush_extra( $self, $mail, $client, 0 ); next; } --- 208,220 ---- # User is issuing the APOP command to start a session with the remote server if ( $command =~ /APOP (.*):((.*):)?(.*) (.*)/i ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $1, $3 || 110 ) ) { # Pass through the USER command with the actual user name for this server, # and send the reply straight to the client ! $self->echo_response_($mail, $client, "APOP $4 $5" ); } else { last; } ! $self->flush_extra_( $mail, $client, 0 ); next; } *************** *** 219,223 **** if ( $command =~ /AUTH ([^ ]+)/ ) { if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = verify_connected( $self, $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { # Loop until we get -ERR or +OK my $response; --- 223,227 ---- if ( $command =~ /AUTH ([^ ]+)/ ) { if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { # Loop until we get -ERR or +OK my $response; *************** *** 239,243 **** } ! flush_extra( $self, $mail, $client, 0 ); } else { $self->tee_( $client, "-ERR No secure server specified$eol" ); --- 243,247 ---- } ! $self->flush_extra_( $mail, $client, 0 ); } else { $self->tee_( $client, "-ERR No secure server specified$eol" ); *************** *** 249,255 **** if ( $command =~ /AUTH/ ) { if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = verify_connected( $self, $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { ! if ( echo_response( $self, $mail, $client, "AUTH" ) ) { ! echo_to_dot_( $self, $mail, $client ); } } else { --- 253,259 ---- if ( $command =~ /AUTH/ ) { if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { ! if ( $self->echo_response_($mail, $client, "AUTH" ) ) { ! $self->echo_to_dot_( $mail, $client ); } } else { *************** *** 257,261 **** } ! flush_extra( $self, $mail, $client, 0 ); } else { $self->tee_( $client, "-ERR No secure server specified$eol" ); --- 261,265 ---- } ! $self->flush_extra_( $mail, $client, 0 ); } else { $self->tee_( $client, "-ERR No secure server specified$eol" ); *************** *** 268,276 **** if ( ( $command =~ /LIST ?(.*)?/i ) || ( $command =~ /UIDL ?(.*)?/i ) ) { ! if ( echo_response( $self, $mail, $client, $command ) ) { ! echo_to_dot_( $self, $mail, $client ) if ( $1 eq '' ); } ! flush_extra( $self, $mail, $client, 0 ); next; } --- 272,280 ---- if ( ( $command =~ /LIST ?(.*)?/i ) || ( $command =~ /UIDL ?(.*)?/i ) ) { ! if ( $self->echo_response_($mail, $client, $command ) ) { ! $self->echo_to_dot_( $mail, $client ) if ( $1 eq '' ); } ! $self->flush_extra_( $mail, $client, 0 ); next; } *************** *** 310,316 **** if ( $2 ne '99999999' ) { if ( $self->config_( 'toptoo' ) ) { ! if ( echo_response( $self, $mail, $client, "RETR $1" ) ) { my $class = $self->{classifier__}->classify_and_modify( $mail, $client, $download_count, $count, 1, '' ); ! if ( echo_response( $self, $mail, $client, $command ) ) { $self->{classifier__}->classify_and_modify( $mail, $client, $download_count, $count, 0, $class ); --- 314,320 ---- if ( $2 ne '99999999' ) { if ( $self->config_( 'toptoo' ) ) { ! if ( $self->echo_response_($mail, $client, "RETR $1" ) ) { my $class = $self->{classifier__}->classify_and_modify( $mail, $client, $download_count, $count, 1, '' ); ! if ( $self->echo_response_($mail, $client, $command ) ) { $self->{classifier__}->classify_and_modify( $mail, $client, $download_count, $count, 0, $class ); *************** *** 320,326 **** } } else { ! echo_to_dot_( $self, $mail, $client ) if ( echo_response( $self, $mail, $client, $command ) ); } ! flush_extra( $self, $mail, $client, 0 ); next; } --- 324,330 ---- } } else { ! $self->echo_to_dot_( $mail, $client ) if ( $self->echo_response_($mail, $client, $command ) ); } ! $self->flush_extra_( $mail, $client, 0 ); next; } *************** *** 333,338 **** if ( $command =~ /CAPA/i ) { if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = verify_connected( $self, $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { ! echo_to_dot_( $self, $mail, $client ) if ( echo_response( $self, $mail, $client, "CAPA" ) ); } else { last; --- 337,342 ---- if ( $command =~ /CAPA/i ) { if ( $self->config_( 'server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'server' ), $self->config_( 'sport' ) ) ) { ! $self->echo_to_dot_( $mail, $client ) if ( $self->echo_response_($mail, $client, "CAPA" ) ); } else { last; *************** *** 342,346 **** } ! flush_extra( $self, $mail, $client, 0 ); next; } --- 346,350 ---- } ! $self->flush_extra_( $mail, $client, 0 ); next; } *************** *** 361,366 **** ( $command =~ /DELE (.*)/i ) || ( $command =~ /RSET/i ) ) { ! echo_response( $self, $mail, $client, $command ); ! flush_extra( $self, $mail, $client, 0 ); next; } --- 365,370 ---- ( $command =~ /DELE (.*)/i ) || ( $command =~ /RSET/i ) ) { ! $self->echo_response_($mail, $client, $command ); ! $self->flush_extra_( $mail, $client, 0 ); next; } *************** *** 372,376 **** # Get the message from the remote server, if there's an error then we're done, but if not then # we echo each line of the message until we hit the . at the end ! if ( echo_response( $self, $mail, $client, $command ) ) { $count += 1; my $class = $self->{classifier__}->classify_and_modify( $mail, $client, $download_count, $count, 0, '' ); --- 376,380 ---- # Get the message from the remote server, if there's an error then we're done, but if not then # we echo each line of the message until we hit the . at the end ! if ( $self->echo_response_($mail, $client, $command ) ) { $count += 1; my $class = $self->{classifier__}->classify_and_modify( $mail, $client, $download_count, $count, 0, '' ); *************** *** 379,383 **** print $pipe "$class$eol"; ! flush_extra( $self, $mail, $client, 0 ); next; } --- 383,387 ---- print $pipe "$class$eol"; ! $self->flush_extra_( $mail, $client, 0 ); next; } *************** *** 389,393 **** if ( $command =~ /QUIT/i ) { if ( $mail ) { ! echo_response( $self, $mail, $client, $command ); close $mail; } else { --- 393,397 ---- if ( $command =~ /QUIT/i ) { if ( $mail ) { ! $self->echo_response_($mail, $client, $command ); close $mail; } else { *************** *** 399,404 **** # Don't know what this is so let's just pass it through and hope for the best if ( $mail && $mail->connected ) { ! echo_response( $self, $mail, $client, $command ); ! flush_extra( $self, $mail, $client, 0 ); next; } else { --- 403,408 ---- # Don't know what this is so let's just pass it through and hope for the best if ( $mail && $mail->connected ) { ! $self->echo_response_($mail, $client, $command ); ! $self->flush_extra_( $mail, $client, 0 ); next; } else { |
From: <jgr...@us...> - 2003-03-03 22:02:06
|
Update of /cvsroot/popfile/engine In directory sc8-pr-cvs1:/tmp/cvs-serv19388 Modified Files: popfile.pl Log Message: Fix up the constructors so that they call the parent classes, add new parameter method to POPFile::Configuration, fix up calls to child and flush_child_data for proxies; various other minor tweaks. With this commit POPFile OO is limping along... my guess is the next commit and you'll be able to try it out Index: popfile.pl =================================================================== RCS file: /cvsroot/popfile/engine/popfile.pl,v retrieving revision 1.205 retrieving revision 1.206 diff -C2 -d -r1.205 -r1.206 *** popfile.pl 3 Mar 2003 15:21:29 -0000 1.205 --- popfile.pl 3 Mar 2003 22:01:27 -0000 1.206 *************** *** 72,76 **** # Check that the $pipe is still a valid handle ! if ( !defined( $pipe ) ) { return 0; --- 72,76 ---- # Check that the $pipe is still a valid handle ! if ( !defined( $pipe ) ) { return 0; *************** *** 78,89 **** if ( $on_windows ) { ! # I am NOT doing a select() here because that does not work # on Perl running on Windows. -s returns the "size" of the file # (in this case a pipe) and will be non-zero if there is data to read ! return ( ( -s $pipe ) > 0 ); } else { ! # Here I do a select because we are not running on Windows where # you can't select() on a pipe --- 78,89 ---- if ( $on_windows ) { ! # I am NOT doing a select() here because that does not work # on Perl running on Windows. -s returns the "size" of the file # (in this case a pipe) and will be non-zero if there is data to read ! return ( ( -s $pipe ) > 0 ); } else { ! # Here I do a select because we are not running on Windows where # you can't select() on a pipe *************** *** 264,268 **** foreach my $type (keys %components) { foreach my $name (keys %{$components{$type}}) { ! $components{$type}{$name}->configuration( $components{core}{config} ) if ( $name ne 'config' ); $components{$type}{$name}->logger( $components{core}{logger} ) if ( $name ne 'logger' ); } --- 264,268 ---- foreach my $type (keys %components) { foreach my $name (keys %{$components{$type}}) { ! $components{$type}{$name}->configuration( $components{core}{config} ); $components{$type}{$name}->logger( $components{core}{logger} ) if ( $name ne 'logger' ); } |
From: <jgr...@us...> - 2003-03-03 22:02:06
|
Update of /cvsroot/popfile/engine/Classifier In directory sc8-pr-cvs1:/tmp/cvs-serv19388/Classifier Modified Files: Bayes.pm Log Message: Fix up the constructors so that they call the parent classes, add new parameter method to POPFile::Configuration, fix up calls to child and flush_child_data for proxies; various other minor tweaks. With this commit POPFile OO is limping along... my guess is the next commit and you'll be able to try it out Index: Bayes.pm =================================================================== RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** Bayes.pm 3 Mar 2003 15:21:37 -0000 1.108 --- Bayes.pm 3 Mar 2003 22:01:30 -0000 1.109 *************** *** 34,38 **** { my $type = shift; ! my $self; # Set this to 1 to get scores for individual words in message detail --- 34,38 ---- { my $type = shift; ! my $self = POPFile::Module->new(); # Set this to 1 to get scores for individual words in message detail *************** *** 111,118 **** # No default unclassified probability ! $self->config_( 'unclassified_probability', 0, 1 ); # The corpus is kept in the 'corpus' subfolder of POPFile ! $self->config_( 'corpus', 'corpus', 1 ); # Get the hostname for use in the X-POPFile-Link header --- 111,118 ---- # No default unclassified probability ! $self->config_( 'unclassified_probability', 0 ); # The corpus is kept in the 'corpus' subfolder of POPFile ! $self->config_( 'corpus', 'corpus' ); # Get the hostname for use in the X-POPFile-Link header |