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: <xue...@us...> - 2003-09-23 21:14:18
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv13242
Modified Files:
installer.nsi
Log Message:
Updated to work with current CVS and use 'popfile.exe' to start POPFile (for 0.20.0).
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.114
retrieving revision 1.115
diff -C2 -d -r1.114 -r1.115
*** installer.nsi 18 Sep 2003 13:30:02 -0000 1.114
--- installer.nsi 23 Sep 2003 21:14:14 -0000 1.115
***************
*** 105,111 ****
!define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.20.0 (CVS BerkeleyDB)"
! !define C_README "v0.19.1.change"
!define C_RELEASE_NOTES "..\engine\${C_README}"
--- 105,111 ----
!define MUI_PRODUCT "POPFile"
[...1205 lines suppressed...]
--- 2417,2426 ----
RMDir $INSTDIR\skins\lavishImages
RMDir $INSTDIR\skins
+
Delete $INSTDIR\manual\en\*.html
RMDir $INSTDIR\manual\en
Delete $INSTDIR\manual\*.gif
RMDir $INSTDIR\manual
+
Delete $INSTDIR\languages\*.msg
RMDir $INSTDIR\languages
***************
*** 2216,2219 ****
--- 2444,2449 ----
!insertmacro SafeRecursiveRMDir "$INSTDIR\auto"
!insertmacro SafeRecursiveRMDir "$INSTDIR\Carp"
+ !insertmacro SafeRecursiveRMDir "$INSTDIR\Encode"
+ !insertmacro SafeRecursiveRMDir "$INSTDIR\Exporter"
!insertmacro SafeRecursiveRMDir "$INSTDIR\File"
!insertmacro SafeRecursiveRMDir "$INSTDIR\IO"
|
|
From: <xue...@us...> - 2003-09-23 21:10:56
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv12632
Modified Files:
pfi-library.nsh
Log Message:
New functions to update 'popfile.cfg' and check for 'locked' files (for 0.20.0).
Index: pfi-library.nsh
===================================================================
RCS file: /cvsroot/popfile/windows/pfi-library.nsh,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** pfi-library.nsh 8 Sep 2003 13:26:38 -0000 1.12
--- pfi-library.nsh 23 Sep 2003 21:10:52 -0000 1.13
***************
*** 232,235 ****
--- 232,305 ----
FunctionEnd
+
+ #--------------------------------------------------------------------------
+ # Installer Function: SetConsoleMode
+ #
+ # Used to set required console mode in 'popfile.cfg'
+ #
+ # Inputs:
+ # (top of stack) - required console mode (0 = disabled, 1 = enabled)
+ #
+ # Outputs:
+ # none
+ #
+ # Usage:
+ # Push "1"
+ # Call SetConsoleMode
+ #
+ #--------------------------------------------------------------------------
+
+ Function SetConsoleMode
+
+ !define L_NEW_CFG $R9 ; file handle used for clean copy
+ !define L_OLD_CFG $R8 ; file handle for old version
+ !define L_LNE $R7 ; a line from the popfile.cfg file
+ !define L_MODE $R6 ; new console mode
+ !define L_PARAM $R5
+
+ Exch ${L_MODE}
+ Push ${L_NEW_CFG}
+ Push ${L_OLD_CFG}
+ Push ${L_LNE}
+ Push ${L_PARAM}
+
+ ClearErrors
+ FileOpen ${L_OLD_CFG} "$INSTDIR\popfile.cfg" r
+ FileOpen ${L_NEW_CFG} "$PLUGINSDIR\new.cfg" w
+
+ loop:
+ FileRead ${L_OLD_CFG} ${L_LNE}
+ IfErrors copy_done
+
+ StrCpy ${L_PARAM} ${L_LNE} 16
+ StrCmp ${L_PARAM} "windows_console " got_console
+ FileWrite ${L_NEW_CFG} ${L_LNE}
+ Goto loop
+
+ got_console:
+ FileWrite ${L_NEW_CFG} "windows_console ${L_MODE}$\r$\n"
+ Goto loop
+
+ copy_done:
+ FileClose ${L_OLD_CFG}
+ FileClose ${L_NEW_CFG}
+
+ Delete "$INSTDIR\popfile.cfg"
+ Rename "$PLUGINSDIR\new.cfg" "$INSTDIR\popfile.cfg"
+
+ Pop ${L_PARAM}
+ Pop ${L_LNE}
+ Pop ${L_OLD_CFG}
+ Pop ${L_NEW_CFG}
+ Pop ${L_MODE}
+
+ !undef L_NEW_CFG
+ !undef L_OLD_CFG
+ !undef L_LNE
+ !undef L_MODE
+ !undef L_PARAM
+
+ FunctionEnd
+
#--------------------------------------------------------------------------
# Installer Function: StrStripLZS
***************
*** 681,705 ****
Function un.GetParent
! Exch $R0
Push $R1
Push $R2
!
! StrCpy $R1 -1
loop:
StrCpy $R2 $R0 1 $R1
- StrCmp $R2 "" exit
StrCmp $R2 "\" exit
- IntOp $R1 $R1 - 1
Goto loop
exit:
StrCpy $R0 $R0 $R1
Pop $R2
Pop $R1
! Exch $R0
FunctionEnd
-
#==============================================================================================
#
--- 751,775 ----
Function un.GetParent
! Exch $R0 ; old $R0 is on top of stack
Push $R1
Push $R2
! Push $R3
! StrLen $R3 $R0
loop:
+ IntOp $R1 $R1 - 1
+ IntCmp $R1 -$R3 exit exit
StrCpy $R2 $R0 1 $R1
StrCmp $R2 "\" exit
Goto loop
exit:
StrCpy $R0 $R0 $R1
+ Pop $R3
Pop $R2
Pop $R1
! Exch $R0 ; put $R0 on top of stack, restore $R0 to original value
FunctionEnd
#==============================================================================================
#
***************
*** 948,956 ****
#--------------------------------------------------------------------------
! # Macro: WaitUntilUnlocked
#
# The installation process and the uninstall process both use a function which checks if
! # either '$INSTDIR\wperl.exe' or $INSTDIR\perl.exe' is being used. It may take a little
! # while for POPFile to shutdown so the installer/uninstaller calls this function which
# waits in a loop until the specified EXE file is no longer in use. A timeout counter
# is used to avoid an infinite loop.
--- 1018,1098 ----
#--------------------------------------------------------------------------
! # Macro: CheckIfLocked
#
# The installation process and the uninstall process both use a function which checks if
! # a particular executable file (an EXE file) is being used (the EXE file to be checked depends
! # upon the version of POPFile in use and upon how it has been configured. If the specified EXE
! # file is no longer in use, this function returns an empty string (otherwise it returns the
! # input parameter unchanged).
! #
! # Inputs:
! # (top of stack) - the full path of the EXE file to be checked
! #
! # Outputs:
! # (top of stack) - if file is no longer in use, an empty string ("") is returned
! # otherwise the input string is returned
! #
! # Usage (after macro has been 'inserted'):
! #
! # Push "$INSTDIR\wperl.exe"
! # Call CheckIfLocked
! # Pop $R0
! #
! # (if the file is no longer in use, $R0 will be "")
! # (if the file is still being used, $R0 will be "$INSTDIR\wperl.exe")
! #--------------------------------------------------------------------------
!
! !macro CheckIfLocked UN
! Function ${UN}CheckIfLocked
! !define L_EXE $R9 ; full path to the EXE file which is to be monitored
! !define L_FILE_HANDLE $R8
!
! Exch ${L_EXE}
! Push ${L_FILE_HANDLE}
!
! IfFileExists "${L_EXE}" 0 unlocked_exit
! SetFileAttributes "${L_EXE}" NORMAL
!
! ClearErrors
! FileOpen ${L_FILE_HANDLE} "${L_EXE}" a
! FileClose ${L_FILE_HANDLE}
! IfErrors exit
!
! unlocked_exit:
! StrCpy ${L_EXE} ""
!
! exit:
! Pop ${L_FILE_HANDLE}
! Exch ${L_EXE}
!
! !undef L_EXE
! !undef L_FILE_HANDLE
! FunctionEnd
! !macroend
!
! #--------------------------------------------------------------------------
! # Installer Function: CheckIfLocked
! #
! # This function is used during the installation process
! #--------------------------------------------------------------------------
!
! !insertmacro CheckIfLocked ""
!
! #--------------------------------------------------------------------------
! # Uninstaller Function: un.CheckIfLocked
! #
! # This function is used during the uninstall process
! #--------------------------------------------------------------------------
!
! !insertmacro CheckIfLocked "un."
!
!
! #--------------------------------------------------------------------------
! # Macro: WaitUntilUnlocked
! #
! # The installation process and the uninstall process both use a function which waits until
! # a particular executable file (an EXE file) is no longer in use (the EXE file to be checked
! # depends upon the version of POPFile in use and upon how it has been configured. It may take
! # a little while for POPFile to shutdown so the installer/uninstaller calls this function which
# waits in a loop until the specified EXE file is no longer in use. A timeout counter
# is used to avoid an infinite loop.
|
|
From: <xue...@us...> - 2003-09-23 21:08:59
|
Update of /cvsroot/popfile/windows/languages In directory sc8-pr-cvs1:/tmp/cvs-serv12249 Modified Files: English-pfi.nsh Log Message: Updated to reflect fact that 'popfile.exe' may use console window (for 0.20.0). Index: English-pfi.nsh =================================================================== RCS file: /cvsroot/popfile/windows/languages/English-pfi.nsh,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** English-pfi.nsh 13 Sep 2003 20:28:13 -0000 1.10 --- English-pfi.nsh 23 Sep 2003 21:08:55 -0000 1.11 *************** *** 83,87 **** !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_POP3 "Choose the default port number for POP3 connections (110 recommended)" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_GUI "Choose the default port for 'User Interface' connections (8080 recommended)" ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_STARTUP "Run POPFile automatically when Windows starts (runs in background)" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_WARNING "IMPORTANT WARNING" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_MESSAGE "IF UPGRADING POPFILE --- INSTALLER WILL SHUTDOWN EXISTING VERSION" --- 83,87 ---- !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_POP3 "Choose the default port number for POP3 connections (110 recommended)" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_GUI "Choose the default port for 'User Interface' connections (8080 recommended)" ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_STARTUP "Run POPFile automatically when Windows starts" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_WARNING "IMPORTANT WARNING" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_MESSAGE "IF UPGRADING POPFILE --- INSTALLER WILL SHUTDOWN EXISTING VERSION" |
|
From: <jgr...@us...> - 2003-09-22 13:27:26
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv21997/UI
Modified Files:
HTML.pm
Log Message:
Merge patch that makes POPFile work well with the Japanese language
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.205
retrieving revision 1.206
diff -C2 -d -r1.205 -r1.206
*** HTML.pm 22 Sep 2003 13:06:39 -0000 1.205
--- HTML.pm 22 Sep 2003 13:27:22 -0000 1.206
***************
*** 44,47 ****
--- 44,61 ----
my $seconds_per_day = 60 * 60 * 24;
+ # These are used for Japanese support
+
+ # ASCII characters
+ my $ascii = '[\x00-\x7F]';
+
+ # EUC-JP 2 byte characters
+ my $two_bytes_euc_jp = '(?:[\x8E\xA1-\xFE][\xA1-\xFE])';
+
+ # EUC-JP 3 byte characters
+ my $three_bytes_euc_jp = '(?:\x8F[\xA1-\xFE][\xA1-\xFE])';
+
+ # EUC-JP characters
+ my $euc_jp = "(?:$ascii|$two_bytes_euc_jp|$three_bytes_euc_jp)";
+
#----------------------------------------------------------------------------
# new
***************
*** 1340,1373 ****
my @words = $self->{classifier__}->get_stopword_list();
! for my $word (sort @words) {
! $word =~ /^(.)/;
! if ( $1 ne $last ) {
! if (! $firstRow) {
! $body .= "</td></tr>\n";
! } else {
! $firstRow = 0;
! }
! $body .= "<tr><th scope=\"row\" class=\"advancedAlphabet";
! if ($groupCounter == $groupSize) {
! $body .= "GroupSpacing";
}
! $body .= "\"><b>$1</b></th>\n";
! $body .= "<td class=\"advancedWords";
! if ($groupCounter == $groupSize) {
! $body .= "GroupSpacing";
! $groupCounter = 0;
}
! $body .= "\">";
! $last = $1;
! $need_comma = 0;
! $groupCounter += 1;
! }
! if ( $need_comma == 1 ) {
! $body .= ", $word";
! } else {
! $body .= $word;
! $need_comma = 1;
}
}
--- 1354,1430 ----
my @words = $self->{classifier__}->get_stopword_list();
! # In Japanese mode, disable locale.
! # Sorting Japanese with "use locale" is memory and time consuming,
! # and may cause perl crash.
!
! if ( $self->config_( 'language' ) eq 'Nihongo' ) {
! no locale;
! for my $word (sort @words) {
!
! # First character of stop word is EUC-JP in Japanese mode
!
! $word =~ /^($euc_jp)/;
!
! if ( $1 ne $last ) {
! if ( !$firstRow ) {
! $body .= "</td></tr>\n";
! } else {
! $firstRow = 0;
! }
! $body .= "<tr><th scope=\"row\" class=\"advancedAlphabet";
! if ( $groupCounter == $groupSize ) {
! $body .= "GroupSpacing";
! }
! $body .= "\"><b>$1</b></th>\n";
! $body .= "<td class=\"advancedWords";
! if ( $groupCounter == $groupSize ) {
! $body .= "GroupSpacing";
! $groupCounter = 0;
! }
! $body .= "\">";
! $last = $1;
! $need_comma = 0;
! $groupCounter += 1;
}
! if ( $need_comma == 1 ) {
! $body .= ", $word";
! } else {
! $body .= $word;
! $need_comma = 1;
}
! }
! } else {
! for my $word (sort @words) {
! $word =~ /^(.)/;
!
! if ( $1 ne $last ) {
! if (! $firstRow) {
! $body .= "</td></tr>\n";
! } else {
! $firstRow = 0;
! }
! $body .= "<tr><th scope=\"row\" class=\"advancedAlphabet";
! if ($groupCounter == $groupSize) {
! $body .= "GroupSpacing";
! }
! $body .= "\"><b>$1</b></th>\n";
! $body .= "<td class=\"advancedWords";
! if ($groupCounter == $groupSize) {
! $body .= "GroupSpacing";
! $groupCounter = 0;
! }
! $body .= "\">";
! $last = $1;
! $need_comma = 0;
! $groupCounter += 1;
! }
! if ( $need_comma == 1 ) {
! $body .= ", $word";
! } else {
! $body .= $word;
! $need_comma = 1;
! }
}
}
***************
*** 2571,2580 ****
my $from = '';
my $subject = '';
if ( open MAIL, '<'. $self->global_config_( 'msgdir' ) . $file ) {
while ( <MAIL> ) {
last if ( /^(\r\n|\r|\n)/ );
! $from = $1 if ( /^From: *(.*)/i );
! $subject = $1 if ( /^Subject: *(.*)/i );
last if ( ( $from ne '' ) && ( $subject ne '' ) );
}
--- 2628,2661 ----
my $from = '';
my $subject = '';
+ my $long_header = '';
if ( open MAIL, '<'. $self->global_config_( 'msgdir' ) . $file ) {
while ( <MAIL> ) {
last if ( /^(\r\n|\r|\n)/ );
!
! # Support long header that has more than 2 lines by JI
!
! if(/^[\t ]+(=\?[\w-]+\?[BQ]\?.*\?=.*)/){
! if($long_header eq 'from'){
! $from .= $1;
! next;
! }
! if($long_header eq 'subject'){
! $subject .= $1;
! next;
! }
! }else{
! if(/^From: *(.*)/i){
! $long_header = 'from';
! $from = $1;
! next;
! }elsif (/^Subject: *(.*)/i){
! $long_header = 'subject';
! $subject = $1;
! next;
! }
! $long_header = '';
! }
!
last if ( ( $from ne '' ) && ( $subject ne '' ) );
}
|
|
From: <jgr...@us...> - 2003-09-22 13:27:26
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv21997/Classifier
Modified Files:
Bayes.pm MailParse.pm
Log Message:
Merge patch that makes POPFile work well with the Japanese language
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.199
retrieving revision 1.200
diff -C2 -d -r1.199 -r1.200
*** Bayes.pm 22 Sep 2003 13:06:39 -0000 1.199
--- Bayes.pm 22 Sep 2003 13:27:21 -0000 1.200
***************
*** 783,791 ****
my $msg_total = 0;
$self->{magnet_used__} = 0;
$self->{magnet_detail__} = '';
if ( defined( $file ) ) {
! $self->{parser__}->parse_file( $file );
}
--- 783,793 ----
my $msg_total = 0;
+ # Pass language parameter to parse_file()
+
$self->{magnet_used__} = 0;
$self->{magnet_detail__} = '';
if ( defined( $file ) ) {
! $self->{parser__}->parse_file( $file, $self->module_config_( 'html', 'language' ) );
}
***************
*** 809,825 ****
$noattype =~ s/\$/__POPFILE_DOLLAR__/g;
! for my $magnet (sort keys %{$self->{magnets__}{$bucket}{$type}}) {
! my $regex;
! $regex = $magnet;
! $regex =~ s/@/__POPFILE_AT__/g;
! $regex =~ s/\$/__POPFILE_DOLLAR__/g;
! if ( $noattype =~ m/\Q$regex\E/i ) {
! $self->{scores__} = '';
! $self->{magnet_used__} = 1;
! $self->{magnet_detail__} = "$type: $magnet";
! return $bucket;
}
}
--- 811,850 ----
$noattype =~ s/\$/__POPFILE_DOLLAR__/g;
! # In Japanese mode, disable locale.
! # Sorting Japanese with "use locale" is memory and time consuming,
! # and may cause perl crash.
! if ( $self->module_config_( 'html', 'language' ) eq 'Nihongo' ) {
! no locale;
! for my $magnet (sort keys %{$self->{magnets__}{$bucket}{$type}}) {
! my $regex;
! $regex = $magnet;
! $regex =~ s/@/__POPFILE_AT__/g;
! $regex =~ s/\$/__POPFILE_DOLLAR__/g;
! if ( $noattype =~ m/\Q$regex\E/i ) {
! $self->{scores__} = '';
! $self->{magnet_used__} = 1;
! $self->{magnet_detail__} = "$type: $magnet";
!
! return $bucket;
! }
! }
! } else {
! for my $magnet (sort keys %{$self->{magnets__}{$bucket}{$type}}) {
! my $regex;
!
! $regex = $magnet;
! $regex =~ s/@/__POPFILE_AT__/g;
! $regex =~ s/\$/__POPFILE_DOLLAR__/g;
!
! if ( $noattype =~ m/\Q$regex\E/i ) {
! $self->{scores__} = '';
! $self->{magnet_used__} = 1;
! $self->{magnet_detail__} = "$type: $magnet";
!
! return $bucket;
! }
}
}
***************
*** 855,859 ****
# the values displayed in scores__; it has no effect on the classification
# process.
!
my $correction = 0;
--- 880,884 ----
# the values displayed in scores__; it has no effect on the classification
# process.
!
my $correction = 0;
***************
*** 874,878 ****
$score{$bucket} += ( $probability * $self->{parser__}{words__}{$word} );
}
!
if ($wmax > $self->{not_likely__}) {
$correction += $self->{not_likely__} * $self->{parser__}{words__}{$word};
--- 899,903 ----
$score{$bucket} += ( $probability * $self->{parser__}{words__}{$word} );
}
!
if ($wmax > $self->{not_likely__}) {
$correction += $self->{not_likely__} * $self->{parser__}{words__}{$word};
***************
*** 915,922 ****
}
-
$class = 'unsure' if ( $certainty < 0.4 );
-
# Compute the total of all the scores to generate the normalized scores and probability
# estimate. $total is always 1 after the first loop iteration, so any additional term
--- 940,945 ----
***************
*** 976,980 ****
$self->{scores__} .= "<a name=\"scores\">";
!
# If there are fewer than 2 buckets, there is no "verdict " to mention.
if (@buckets > 1) {
--- 999,1003 ----
$self->{scores__} .= "<a name=\"scores\">";
!
# If there are fewer than 2 buckets, there is no "verdict " to mention.
if (@buckets > 1) {
***************
*** 1018,1026 ****
$self->{scores__} .= "</table><hr>";
!
# We want a link to change the format here. But only the UI knows how to build
# that link. So we just insert a comment which can be replaced by the UI. There's
# probably a better way.
!
$self->{scores__} .= "<!--format--><p>";
$self->{scores__} .= "<table class=\"top20Words\">\n";
--- 1041,1049 ----
$self->{scores__} .= "</table><hr>";
!
# We want a link to change the format here. But only the UI knows how to build
# that link. So we just insert a comment which can be replaced by the UI. There's
# probably a better way.
!
$self->{scores__} .= "<!--format--><p>";
$self->{scores__} .= "<table class=\"top20Words\">\n";
***************
*** 1036,1043 ****
my %wordprobs;
!
# If the word matrix is supposed to show probabilities, compute them,
# saving the results in %wordprobs.
!
if ( $self->{wmformat__} eq 'prob') {
foreach my $word (keys %{$self->{parser__}->{words__}}) {
--- 1059,1066 ----
my %wordprobs;
!
# If the word matrix is supposed to show probabilities, compute them,
# saving the results in %wordprobs.
!
if ( $self->{wmformat__} eq 'prob') {
foreach my $word (keys %{$self->{parser__}->{words__}}) {
***************
*** 1053,1057 ****
}
}
!
my @ranked_words;
if ($self->{wmformat__} eq 'prob') {
--- 1076,1080 ----
}
}
!
my @ranked_words;
if ($self->{wmformat__} eq 'prob') {
***************
*** 1400,1403 ****
--- 1423,1432 ----
close TEMP;
+ # Parse Japanese mail message with Kakasi
+
+ if ( $self->module_config_( 'html', 'language' ) eq 'Nihongo' ) {
+ parse_with_kakasi( $self, $temp_file, $dcount, $mcount );
+ }
+
# If we don't yet know the classification then stop the parser
if ( $class eq '' ) {
***************
*** 1726,1730 ****
$self->{parser__}->{color__} = 1;
$self->{parser__}->{bayes__} = bless $self;
! my $result = $self->{parser__}->parse_file( $file );
$self->{parser__}->{color__} = 0;
--- 1755,1763 ----
$self->{parser__}->{color__} = 1;
$self->{parser__}->{bayes__} = bless $self;
!
! # Pass language parameter to parse_file()
!
! my $result = $self->{parser__}->parse_file( $file, $self->module_config_( 'html', 'language' ) );
!
$self->{parser__}->{color__} = 0;
***************
*** 1861,1869 ****
}
foreach my $file (@files) {
! $self->{parser__}->parse_file( $file );
! foreach my $word (keys %{$self->{parser__}->{words__}}) {
! $self->set_value_( $bucket, $word, $self->{parser__}->{words__}{$word} + $self->get_base_value_( $bucket, $word ) );
}
}
--- 1894,1915 ----
}
+ # Pass language parameter to parse_file()
+
foreach my $file (@files) {
! $self->{parser__}->parse_file( $file, $self->module_config_( 'html', 'language' ) );
! # In Japanese mode, disable locale.
! # Sorting Japanese with "use locale" is memory and time consuming,
! # and may cause perl crash.
!
! if ( $self->module_config_( 'html', 'language' ) eq 'Nihongo' ) {
! no locale;
! foreach my $word (keys %{$self->{parser__}->{words__}}) {
! $self->set_value_( $bucket, $word, $self->{parser__}->{words__}{$word} + $self->get_base_value_( $bucket, $word ) );
! }
! } else {
! foreach my $word (keys %{$self->{parser__}->{words__}}) {
! $self->set_value_( $bucket, $word, $self->{parser__}->{words__}{$word} + $self->get_base_value_( $bucket, $word ) );
! }
}
}
***************
*** 1912,1919 ****
}
! $self->{parser__}->parse_file( $file );
! foreach my $word (keys %{$self->{parser__}->{words__}}) {
! $self->set_value_( $bucket, $word, $self->get_base_value_( $bucket, $word ) - $self->{parser__}->{words__}{$word} );
}
--- 1958,1978 ----
}
! # Pass language parameter to parse_file()
! $self->{parser__}->parse_file( $file, $self->module_config_( 'html', 'language' ) );
!
! # In Japanese mode, disable locale.
! # Sorting Japanese with "use locale" is memory and time consuming,
! # and may cause perl crash.
!
! if ( $self->module_config_( 'html', 'language' ) eq 'Nihongo' ) {
! no locale;
! foreach my $word (keys %{$self->{parser__}->{words__}}) {
! $self->set_value_( $bucket, $word, $self->get_base_value_( $bucket, $word ) - $self->{parser__}->{words__}{$word} );
! }
! } else {
! foreach my $word (keys %{$self->{parser__}->{words__}}) {
! $self->set_value_( $bucket, $word, $self->get_base_value_( $bucket, $word ) - $self->{parser__}->{words__}{$word} );
! }
}
***************
*** 2067,2071 ****
my ( $self, $bucket, $type ) = @_;
! return sort keys %{$self->{magnets__}{$bucket}{$type}};
}
--- 2126,2139 ----
my ( $self, $bucket, $type ) = @_;
! # In Japanese mode, disable locale.
! # Sorting Japanese with "use locale" is memory and time consuming,
! # and may cause perl crash.
!
! if ( $self->module_config_( 'html', 'language' ) eq 'Nihongo' ) {
! no locale;
! return sort keys %{$self->{magnets__}{$bucket}{$type}};
! } else {
! return sort keys %{$self->{magnets__}{$bucket}{$type}};
! }
}
***************
*** 2204,2212 ****
return $self->{magnet_count__};
}
!
sub wmformat
{
my ( $self, $value ) = @_;
!
$self->{wmformat__} = $value if (defined $value);
return $self->{wmformat__};
--- 2272,2336 ----
return $self->{magnet_count__};
}
!
! # ---------------------------------------------------------------------------------------------
! #
! # parse_with_kakasi
! #
! # Parse Japanese mail message with Kakasi
! #
! # Japanese needs to be parsed by language processing filter, "Kakasi"
! # before it is passed to Bayes classifier because words are not splitted
! # by spaces.
! #
! # $file The file to parse
! #
! # ---------------------------------------------------------------------------------------------
! sub parse_with_kakasi
! {
! my ( $self, $file, $dcount, $mcount ) = @_;
!
! # This is used for Japanese support
! require Encode;
!
! # This is used to parse Japanese
! require Text::Kakasi;
!
! my $temp_file = $self->global_config_( 'msgdir' ) . "kakasi$dcount" . "=$mcount.msg";
! print $temp_file;
!
! # Split Japanese email body into words using Kakasi Wakachigaki
! # mode(-w is passed to Kakasi as argument). The most common charset of
! # Japanese email is ISO-2022-JP, alias is jis, so -ijis and -ojis
! # are passed to tell Kakasi the input charset and the output charset
! # explicitly.
! #
! # After Kakasi processing, Encode::from_to is used to convert into UTF-8.
! #
! # Japanese email charset is assumed to be ISO-2022-JP. Needs to expand for
! # other possible charset, such as Shift_JIS, EUC-JP, UTF-8.
!
! Text::Kakasi::getopt_argv("kakasi", "-w -ijis -ojis");
! open KAKASI_IN, "<$file";
! open KAKASI_OUT, ">$temp_file";
!
! while( <KAKASI_IN> ){
! my $kakasi_out;
!
! $kakasi_out = Text::Kakasi::do_kakasi($_);
! Encode::from_to($kakasi_out, "iso-2022-jp", "euc-jp");
! print KAKASI_OUT $kakasi_out;
! }
!
! close KAKASI_OUT;
! close KAKASI_IN;
! Text::Kakasi::close_kanwadict();
! unlink( $file );
! rename( $temp_file, $file );
! }
!
sub wmformat
{
my ( $self, $value ) = @_;
!
$self->{wmformat__} = $value if (defined $value);
return $self->{wmformat__};
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.161
retrieving revision 1.162
diff -C2 -d -r1.161 -r1.162
*** MailParse.pm 19 Sep 2003 20:18:52 -0000 1.161
--- MailParse.pm 22 Sep 2003 13:27:21 -0000 1.162
***************
*** 32,35 ****
--- 32,56 ----
use MIME::QuotedPrint;
+ # These are used for Japanese support
+
+ use Encode;
+ my $ascii = '[\x00-\x7F]'; # ASCII chars
+ my $two_bytes_euc_jp = '(?:[\x8E\xA1-\xFE][\xA1-\xFE])'; # 2bytes EUC-JP chars
+ my $three_bytes_euc_jp = '(?:\x8F[\xA1-\xFE][\xA1-\xFE])'; # 3bytes EUC-JP chars
+ my $euc_jp = "(?:$ascii|$two_bytes_euc_jp|$three_bytes_euc_jp)"; # EUC-JP chars
+
+ # Symbols in EUC-JP chars which cannot be considered a part of words
+ my $symbol_row1_euc_jp = '(?:[\xA1][\xA1-\xBB\xBD-\xFE])';
+ my $symbol_row2_euc_jp = '(?:[\xA2][\xA1-\xFE])';
+ my $symbol_row8_euc_jp = '(?:[\xA8][\xA1-\xFE])';
+ my $symbol_euc_jp = "(?:$symbol_row1_euc_jp|$symbol_row2_euc_jp|$symbol_row8_euc_jp)";
+
+ # Cho-on kigou(symbol in Japanese), a special symbol which can appear in middle of words
+ my $cho_on_symbol = '(?:\xA1\xBC)';
+
+ # Non-symbol EUC-JP chars
+ my $non_symbol_two_bytes_euc_jp = '(?:[\x8E\xA3-\xA7\xB0-\xFE][\xA1-\xFE])';
+ my $non_symbol_euc_jp = "(?:$non_symbol_two_bytes_euc_jp|$three_bytes_euc_jp|$cho_on_symbol)";
+
# HTML entity mapping to character codes, this maps things like & to their corresponding
# character code
***************
*** 173,176 ****
--- 194,201 ----
$self->{html_arg__} = '';
$self->{in_headers__} = 0;
+
+ # This is used for switching on/off language specific functionality
+ $self->{lang__} = '';
+
$self->{first20__} = '';
***************
*** 462,476 ****
}
! # Only care about words between 3 and 45 characters since short words like
! # an, or, if are too common and the longest word in English (according to
! # the OED) is pneumonoultramicroscopicsilicovolcanoconiosis
! while ( $line =~ s/([[:alpha:]][[:alpha:]\']{1,44})([_\-,\.\"\'\)\?!:;\/& \t\n\r]{0,5}|$)// ) {
! if ( ( $self->{in_headers__} == 0 ) && ( $self->{first20count__} < 20 ) ) {
! $self->{first20count__} += 1;
! $self->{first20__} .= " $1";
}
! update_word($self,$1, $encoded, '', '[_\-,\.\"\'\)\?!:;\/ &\t\n\r]', $prefix) if (length $1 >= 3);
}
--- 487,529 ----
}
! if ( $self->{lang__} eq 'Nihongo' ) {
! # In Japanese mode, non-symbol EUC-JP characters should be
! # matched.
! #
! # ^$euc_jp*? is added to avoid incorrect matching.
! # For example, EUC-JP char represented by code A4C8, should not
! # match the middle of two EUC-JP chars represented by CCA4 and
! # C8BE, the second byte of the first char and the first byte of
! # the second char.
! while ( $line =~ s/^$euc_jp*?(([A-Za-z]|$non_symbol_euc_jp)([A-Za-z\']|$non_symbol_euc_jp){1,44})([_\-,\.\"\'\)\?!:;\/& \t\n\r]{0,5}|$)//ox ) {
! if ( ( $self->{in_headers__} == 0 ) && ( $self->{first20count__} < 20 ) ) {
! $self->{first20count__} += 1;
! $self->{first20__} .= " $1";
! }
!
! my $matched_word = $1;
!
! # In Japanese, 2 characters words are common, so care about
! # words between 2 and 45 characters
!
! if (((length $matched_word >= 3) && ($matched_word =~ /[A-Za-z]/)) || ((length $matched_word >= 2) && ($matched_word =~ /$non_symbol_euc_jp/))) {
! update_word($self, $matched_word, $encoded, '', '[_\-,\.\"\'\)\?!:;\/ &\t\n\r]'."|$symbol_euc_jp", $prefix);
! }
}
! } else {
! # Only care about words between 3 and 45 characters since short words like
! # an, or, if are too common and the longest word in English (according to
! # the OED) is pneumonoultramicroscopicsilicovolcanoconiosis
!
! while ( $line =~ s/([[:alpha:]][[:alpha:]\']{1,44})([_\-,\.\"\'\)\?!:;\/& \t\n\r]{0,5}|$)// ) {
! if ( ( $self->{in_headers__} == 0 ) && ( $self->{first20count__} < 20 ) ) {
! $self->{first20count__} += 1;
! $self->{first20__} .= " $1";
! }
!
! update_word($self,$1, $encoded, '', '[_\-,\.\"\'\)\?!:;\/ &\t\n\r]', $prefix) if (length $1 >= 3);
! }
}
***************
*** 1026,1034 ****
#
# $file The file to open and parse
#
# ---------------------------------------------------------------------------------------------
sub parse_file
{
! my ( $self, $file ) = @_;
$self->start_parse();
--- 1079,1091 ----
#
# $file The file to open and parse
+ # $lang Pass in the current interface language for language specific parsing
#
# ---------------------------------------------------------------------------------------------
sub parse_file
{
! # $lang is used for switching on/off language specific functionality
!
! my ( $self, $file, $lang ) = @_;
! $self->{lang__} = $lang;
$self->start_parse();
***************
*** 1385,1397 ****
my $decode_it = '';
! while ( $mystring =~ /=\?[\w-]+\?(B|Q)\?(.*?)\?=/ig ) {
! if ($1 eq "B" || $1 eq "b") {
! $decode_it = decode_base64( $2 );
$mystring =~ s/=\?[\w-]+\?B\?(.*?)\?=/$decode_it/i;
} else {
! if ($1 eq "Q" || $1 eq "q") {
! $decode_it = $2;
$decode_it =~ s/\_/=20/g;
$decode_it = decode_qp( $decode_it );
$mystring =~ s/=\?[\w-]+\?Q\?(.*?)\?=/$decode_it/i;
}
--- 1442,1466 ----
my $decode_it = '';
! while ( $mystring =~ /=\?([\w-]+)\?(B|Q)\?(.*?)\?=/ig ) {
! if ($2 eq "B" || $2 eq "b") {
! $decode_it = decode_base64( $3 );
!
! # for Japanese header
! if (uc($1) eq "ISO-2022-JP") {
! Encode::from_to($decode_it, "iso-2022-jp", "euc-jp");
! }
!
$mystring =~ s/=\?[\w-]+\?B\?(.*?)\?=/$decode_it/i;
} else {
! if ($2 eq "Q" || $2 eq "q") {
! $decode_it = $3;
$decode_it =~ s/\_/=20/g;
$decode_it = decode_qp( $decode_it );
+
+ # for Japanese header
+ if (uc($1) eq "ISO-2022-JP") {
+ Encode::from_to($decode_it, "iso-2022-jp", "euc-jp");
+ }
+
$mystring =~ s/=\?[\w-]+\?Q\?(.*?)\?=/$decode_it/i;
}
|
|
From: <jgr...@us...> - 2003-09-22 13:27:26
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv21997/POPFile
Modified Files:
Loader.pm
Log Message:
Merge patch that makes POPFile work well with the Japanese language
Index: Loader.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Loader.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Loader.pm 20 Sep 2003 21:28:23 -0000 1.10
--- Loader.pm 22 Sep 2003 13:27:22 -0000 1.11
***************
*** 567,571 ****
}
! print "\n\nPOPFile Engine ", $self->CORE_version(), " running\n" if $self->{debug__};
flush STDOUT;
}
--- 567,571 ----
}
! print "\n\nPOPFile Engine ", scalar($self->CORE_version()), " running\n" if $self->{debug__};
flush STDOUT;
}
|
|
From: <jgr...@us...> - 2003-09-22 13:07:14
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv18165/Classifier
Modified Files:
Bayes.pm
Log Message:
Merge Alan Beale's patch that improves the display of word probabilities
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.198
retrieving revision 1.199
diff -C2 -d -r1.198 -r1.199
*** Bayes.pm 19 Sep 2003 20:18:52 -0000 1.198
--- Bayes.pm 22 Sep 2003 13:06:39 -0000 1.199
***************
*** 63,66 ****
--- 63,69 ----
$self->{wordscores__} = 0;
+ # Choice for the format of the "word matrix" display.
+ $self->{wmformat__} = 'prob';
+
# Just our hostname
$self->{hostname__} = '';
***************
*** 846,851 ****
--- 849,864 ----
my $word_count = 0;
+ # The correction value is used to generate score displays in the scores__
+ # variable which are consistent with the word scores shown by the GUI's
+ # word lookup feature. It is computed to make the contribution of a word
+ # which is unrepresented in a bucket zero. This correction affects only
+ # the values displayed in scores__; it has no effect on the classification
+ # process.
+
+ my $correction = 0;
+
foreach my $word (keys %{$self->{parser__}->{words__}}) {
$word_count += 2;
+ my $wmax = -10000;
foreach my $bucket (@buckets) {
***************
*** 854,857 ****
--- 867,871 ----
$matchcount{$bucket} += $self->{parser__}{words__}{$word} if ($probability != 0);
$probability = $self->{not_likely__} if ( $probability == 0 );
+ $wmax = $probability if ( $wmax < $probability );
# Here we are doing the bayes calculation: P(word|bucket) is in probability
***************
*** 860,863 ****
--- 874,883 ----
$score{$bucket} += ( $probability * $self->{parser__}{words__}{$word} );
}
+
+ if ($wmax > $self->{not_likely__}) {
+ $correction += $self->{not_likely__} * $self->{parser__}{words__}{$word};
+ } else {
+ $correction += $wmax * $self->{parser__}{words__}{$word};
+ }
}
***************
*** 866,890 ****
my @ranking = sort {$score{$b} <=> $score{$a}} keys %score;
foreach my $bucket (@buckets) {
$chi{$bucket} = chi2( $score{$bucket}, $word_count, -int($score{$ranking[0]}/log(10)) * log(10) );
}
! # If no bucket has a probability better than 0.5, call the message "unclassified".
my $class = 'unclassified';
! if ( $score{$ranking[0]} > ( $score{$ranking[1]} + $self->{unclassified__} ) ) {
$class = $ranking[0];
}
# Now take a look at the top two chi tests, if they are close to each other then
! # we are unsure
my $c0 = 1.0 - $chi{$ranking[0]};
my $c1 = 1.0 - $chi{$ranking[1]};
- my $certainty = ($c1-$c0 + 1) / 2;
$class = 'unsure' if ( $certainty < 0.4 );
if ($self->{wordscores__} && defined($ui) ) {
my %qm = %{$self->{parser__}->quickmagnets()};
--- 886,935 ----
my @ranking = sort {$score{$b} <=> $score{$a}} keys %score;
+ my %raw_score;
+ my $base_score = $score{$ranking[0]};
+ my $total = 0;
+
foreach my $bucket (@buckets) {
$chi{$bucket} = chi2( $score{$bucket}, $word_count, -int($score{$ranking[0]}/log(10)) * log(10) );
}
! # If the first and second bucket are too close in their probabilities, call the message
! # unclassified. Also if there are fewer than 2 buckets.
my $class = 'unclassified';
! if ( @buckets > 1 && $score{$ranking[0]} > ( $score{$ranking[1]} + $self->{unclassified__} ) ) {
$class = $ranking[0];
}
# Now take a look at the top two chi tests, if they are close to each other then
! # we are unsure. If there are fewer than two buckets, the message is unclassified,
! # and there is no point to looking at the chi result.
+ my $certainty;
+ if (@buckets > 1) {
my $c0 = 1.0 - $chi{$ranking[0]};
my $c1 = 1.0 - $chi{$ranking[1]};
+ $certainty = ($c1-$c0 + 1) / 2;
+ } else {
+ $certainty = 1.0;
+ }
$class = 'unsure' if ( $certainty < 0.4 );
+
+ # Compute the total of all the scores to generate the normalized scores and probability
+ # estimate. $total is always 1 after the first loop iteration, so any additional term
+ # less than 2 ** -54 is insignificant, and need not be computed.
+
+ my $ln2p_54 = -54 * log(2);
+
+ foreach my $b (@ranking) {
+ $raw_score{$b} = $score{$b};
+ $score{$b} -= $base_score;
+
+ $total += exp($score{$b}) if ($score{$b} > $ln2p_54 );
+ }
+
if ($self->{wordscores__} && defined($ui) ) {
my %qm = %{$self->{parser__}->quickmagnets()};
***************
*** 930,951 ****
}
! $self->{scores__} .= "<hr><b>$language{Scores}</b><p>\n<b>Verdict: <font color=\"$self->{colors__}{$class}\">$class ($certainty $chi{$ranking[0]} $chi{$ranking[1]})</font></b><p>\n<table class=\"top20Words\">\n<tr>\n<th scope=\"col\">$language{Bucket}</th>\n<th> </th>\n";
$self->{scores__} .= "<th scope=\"col\">$language{Count} </th><th scope=\"col\">$language{Probability}</th></tr>\n";
foreach my $b (@ranking) {
! # Take a score value (which is log of the probability) and write it out as 0.000000 lots 00000001234, to do this we
! # calculate the number of 0 between the . and the first significant digit and output the number of zeroes and
! # then the significant digits
! my $zero_count = -int($score{$b}/log(10));
! my $significant = sprintf( "%.6f", exp($score{$b} + $zero_count * log(10)) );
! $significant =~ s/^0\.//;
! my $probstr = sprintf( "0. [%d zeroes] %s", $zero_count, $significant );
$self->{scores__} .= "<tr>\n<td><font color=\"$self->{colors__}{$b}\"><b>$b</b></font></td>\n<td> </td>\n<td align=\"right\">$matchcount{$b} </td>\n<td>$probstr</td>\n</tr>\n";
}
$self->{scores__} .= "</table><hr>";
$self->{scores__} .= "<table class=\"top20Words\">\n";
$self->{scores__} .= "<tr>\n<th scope=\"col\">$language{Word}</th><th> </th><th scope=\"col\">$language{Count}</th><th> </th>\n";
--- 975,1027 ----
}
! $self->{scores__} .= "<a name=\"scores\">";
!
! # If there are fewer than 2 buckets, there is no "verdict " to mention.
! if (@buckets > 1) {
! $self->{scores__} .= "<hr><b>$language{Scores}</b><p>\n<b>Verdict: <font color=\"$self->{colors__}{$class}\">$class ($certainty $chi{$ranking[0]} $chi{$ranking[1]})</font></b><p>\n";
! } else {
! $self->{scores__} .= "<hr><b>$language{Scores}</b><p>\n";
! }
! $self->{scores__} .= "<table class=\"top20Words\">\n<tr>\n<th scope=\"col\">$language{Bucket}</th>\n<th> </th>\n";
! if ($self->{wmformat__} eq 'score') {
! $self->{scores__} .= "<th scope=\"col\">$language{Count} </th><th scope=\"col\" align=\"center\">$language{Score}</th><th scope=\"col\">$language{Probability}</th></tr>\n";
! } else {
$self->{scores__} .= "<th scope=\"col\">$language{Count} </th><th scope=\"col\">$language{Probability}</th></tr>\n";
+ }
+
+ my $log10 = log(10.0);
foreach my $b (@ranking) {
+ my $prob = exp($score{$b})/$total;
+ my $probstr;
+ my $rawstr;
! # If the computed probability would display as 1, display it as .999999 instead.
! # We don't want to give the impression that POPFile is ever completely sure of its
! # classification.
! if ($prob >= .999999) {
! $probstr = sprintf("%12.6f", 0.999999);
! } elsif ($prob >= 0.1 || $prob == 0.0) {
! $probstr = sprintf("%12.6f", $prob);
! } else {
! $probstr = sprintf("%17.6e", $prob);
! }
+ if ($self->{wmformat__} eq 'score') {
+ $rawstr = sprintf("%12.6f", ($raw_score{$b} - $correction)/$log10);
+ $self->{scores__} .= "<tr>\n<td><font color=\"$self->{colors__}{$b}\"><b>$b</b></font></td>\n<td> </td>\n<td align=\"right\">$matchcount{$b} </td>\n<td align=right>$rawstr </td>\n<td>$probstr</td>\n</tr>\n";
+ } else {
$self->{scores__} .= "<tr>\n<td><font color=\"$self->{colors__}{$b}\"><b>$b</b></font></td>\n<td> </td>\n<td align=\"right\">$matchcount{$b} </td>\n<td>$probstr</td>\n</tr>\n";
}
+ }
$self->{scores__} .= "</table><hr>";
+
+ # We want a link to change the format here. But only the UI knows how to build
+ # that link. So we just insert a comment which can be replaced by the UI. There's
+ # probably a better way.
+
+ $self->{scores__} .= "<!--format--><p>";
$self->{scores__} .= "<table class=\"top20Words\">\n";
$self->{scores__} .= "<tr>\n<th scope=\"col\">$language{Word}</th><th> </th><th scope=\"col\">$language{Count}</th><th> </th>\n";
***************
*** 959,963 ****
$self->{scores__} .= "</tr>";
! my @ranked_words = sort {$self->get_sort_value_( $ranking[0], $b ) <=> $self->get_sort_value_( $ranking[0], $a )} keys %{$self->{parser__}->{words__}};
foreach my $word (@ranked_words) {
--- 1035,1063 ----
$self->{scores__} .= "</tr>";
! my %wordprobs;
!
! # If the word matrix is supposed to show probabilities, compute them,
! # saving the results in %wordprobs.
!
! if ( $self->{wmformat__} eq 'prob') {
! foreach my $word (keys %{$self->{parser__}->{words__}}) {
! my $sumfreq = 0;
! my %wval;
! foreach my $bucket (@ranking) {
! $wval{$bucket} = exp(get_sort_value_( $self, $bucket, $word ));
! $sumfreq += $wval{$bucket};
! }
! foreach my $bucket (@ranking) {
! $wordprobs{$bucket,$word} = $wval{$bucket} / $sumfreq;
! }
! }
! }
!
! my @ranked_words;
! if ($self->{wmformat__} eq 'prob') {
! @ranked_words = sort {$wordprobs{$ranking[0],$b} <=> $wordprobs{$ranking[0],$a}} keys %{$self->{parser__}->{words__}};
! } else {
! @ranked_words = sort {$self->get_sort_value_( $ranking[0], $b ) <=> $self->get_sort_value_( $ranking[0], $a )} keys %{$self->{parser__}->{words__}};
! }
foreach my $word (@ranked_words) {
***************
*** 989,993 ****
if ( $probability != 0 ) {
! my $wordprobstr = sprintf("%12.4f", exp($probability) );
$self->{scores__} .= "<td><font color=\"$color\">$wordprobstr</font></td>\n<td> </td>\n";
--- 1089,1100 ----
if ( $probability != 0 ) {
! my $wordprobstr;
! if ($self->{wmformat__} eq 'score') {
! $wordprobstr = sprintf("%12.4f", ($probability - $self->{not_likely__})/$log10 );
! } elsif ($self->{wmformat__} eq 'prob') {
! $wordprobstr = sprintf("%12.4f", $wordprobs{$bucket,$word});
! } else {
! $wordprobstr = sprintf("%13.5f", exp($probability) );
! }
$self->{scores__} .= "<td><font color=\"$color\">$wordprobstr</font></td>\n<td> </td>\n";
***************
*** 1762,1765 ****
--- 1869,1874 ----
}
+ $self->load_word_matrix_();
+
return 1;
}
***************
*** 2094,2097 ****
--- 2203,2214 ----
return $self->{magnet_count__};
+ }
+
+ sub wmformat
+ {
+ my ( $self, $value ) = @_;
+
+ $self->{wmformat__} = $value if (defined $value);
+ return $self->{wmformat__};
}
|
|
From: <jgr...@us...> - 2003-09-22 13:07:14
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv18165/UI
Modified Files:
HTML.pm
Log Message:
Merge Alan Beale's patch that improves the display of word probabilities
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.204
retrieving revision 1.205
diff -C2 -d -r1.204 -r1.205
*** HTML.pm 15 Sep 2003 15:46:24 -0000 1.204
--- HTML.pm 22 Sep 2003 13:06:39 -0000 1.205
***************
*** 204,207 ****
--- 204,211 ----
$self->config_( 'archive_classes', 0 );
+ # This setting defines what is displayed in the word matrix: 'freq' for frequencies,
+ # 'prob' for probabilities, 'score' for logarithmic scores.
+ $self->config_( 'wordtable_format', 'prob' );
+
# Load skins
***************
*** 262,265 ****
--- 266,274 ----
$self->load_history_cache__();
+ # Set the classifier option wmformat__ according to our wordtable_format
+ # option.
+
+ $self->{classifier__}->wmformat( $self->config_( 'wordtable_format' ) );
+
return $self->SUPER::start();
}
***************
*** 2215,2219 ****
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;
my $normal = sprintf("%.10f", $n);
$score = sprintf("%.10f", $score);
--- 2224,2228 ----
my $prob = exp( $self->{classifier__}->get_value_( $bucket, $word ) );
my $n = ($total > 0)?$prob / $total:0;
! my $score = ($#buckets >= 0)?(log($prob)-$self->{classifier__}->{not_likely__})/log(10.0):0;
my $normal = sprintf("%.10f", $n);
$score = sprintf("%.10f", $score);
***************
*** 3294,3297 ****
--- 3303,3315 ----
$self->{form_}{search} = '' if ( !defined( $self->{form_}{search} ) );
$self->{form_}{filter} = '' if ( !defined( $self->{form_}{filter} ) );
+ $self->{form_}{format} = '' if ( !defined( $self->{form_}{format} ) );
+
+ # If a format change was requested for the word matrix, record it in the
+ # configuration and in the classifier options.
+
+ if ( $self->{form_}{format} ne '' ) {
+ $self->config_( 'wordtable_format', $self->{form_}{format} );
+ $self->{classifier__}->wmformat( $self->{form_}{format} );
+ }
my $index = -1;
***************
*** 3383,3389 ****
--- 3401,3437 ----
$body .= "<tr>\n<td class=\"openMessageBody\"><hr><p>";
+ my $fmtlinks;
+
if ( $self->{history__}{$mail_file}{magnet} eq '' ) {
$body .= $self->{classifier__}->get_html_colored_message($self->global_config_( 'msgdir' ) . $mail_file);
+ # We want to insert a link to change the output format at the start of the word
+ # matrix. The classifier puts a comment in the right place, which we can replace
+ # by the link. (There's probably a better way.)
+
+ $fmtlinks = "<table width=\"100%\">\n<td class=\"top20\" align=\"left\"><b>$self->{language__}{View_WordMatrix}</b></td>\n<td class=\"historyNavigatorTop\">\n";
+ if ($self->config_( 'wordtable_format' ) ne 'freq' ) {
+ $fmtlinks .= "<a href=\"/view?view=" . $self->{history_keys__}[ $index ];
+ $fmtlinks .= "&start_message=". ((( $index ) >= $start_message )?$start_message:($start_message - $self->config_( 'page_size' )));
+ $fmtlinks .= $self->print_form_fields_(0,1,('filter','session','search','sort')) . "&format=freq#scores\"> ";
+ $fmtlinks .= $self->{language__}{View_ShowFrequencies};
+ $fmtlinks .= "</a> \n";
+ }
+ if ($self->config_( 'wordtable_format' ) ne 'prob' ) {
+ $fmtlinks .= "<a href=\"/view?view=" . $self->{history_keys__}[ $index ];
+ $fmtlinks .= "&start_message=". ((( $index ) >= $start_message )?$start_message:($start_message - $self->config_( 'page_size' )));
+ $fmtlinks .= $self->print_form_fields_(0,1,('filter','session','search','sort')) . "&format=prob#scores\"> ";
+ $fmtlinks .= $self->{language__}{View_ShowProbabilities};
+ $fmtlinks .= "</a> \n";
+ }
+ if ($self->config_( 'wordtable_format' ) ne 'score' ) {
+ $fmtlinks .= "<a href=\"/view?view=" . $self->{history_keys__}[ $index ];
+ $fmtlinks .= "&start_message=". ((( $index ) >= $start_message )?$start_message:($start_message - $self->config_( 'page_size' )));
+ $fmtlinks .= $self->print_form_fields_(0,1,('filter','session','search','sort')) . "&format=score#scores\"> ";
+ $fmtlinks .= $self->{language__}{View_ShowScores};
+ $fmtlinks .= "</a> \n";
+ }
+ $fmtlinks .= "</a></td></table>";
+
# Enable saving of word-scores
***************
*** 3442,3446 ****
if ($self->{history__}{$mail_file}{magnet} eq '') {
! $body .= $self->{classifier__}->scores();
$self->{classifier__}->scores('');
} else {
--- 3490,3496 ----
if ($self->{history__}{$mail_file}{magnet} eq '') {
! my $score_text = $self->{classifier__}->scores();
! $score_text =~ s/\<\!--format--\>/$fmtlinks/;
! $body .= $score_text;
$self->{classifier__}->scores('');
} else {
|
|
From: <jgr...@us...> - 2003-09-22 13:07:14
|
Update of /cvsroot/popfile/engine/languages In directory sc8-pr-cvs1:/tmp/cvs-serv18165/languages Modified Files: English.msg Log Message: Merge Alan Beale's patch that improves the display of word probabilities Index: English.msg =================================================================== RCS file: /cvsroot/popfile/engine/languages/English.msg,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** English.msg 19 Sep 2003 20:18:52 -0000 1.43 --- English.msg 22 Sep 2003 13:06:39 -0000 1.44 *************** *** 273,276 **** --- 273,280 ---- View_Title Single Message View + View_ShowFrequencies Show word frequencies + View_ShowProbabilities Show word probabilities + View_ShowScores Show word scores + View_WordMatrix Word matrix Windows_TrayIcon Show POPFile icon in Windows system tray? |
|
From: <xue...@us...> - 2003-09-22 12:56:22
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv16215
Modified Files:
translator.nsi
Log Message:
Updated to use new custom UI (for improved banner display) and to support Greek.
Index: translator.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/translator.nsi,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** translator.nsi 15 Aug 2003 18:20:29 -0000 1.1
--- translator.nsi 22 Sep 2003 12:56:14 -0000 1.2
***************
*** 59,62 ****
--- 59,63 ----
# windows\POPFileIcon\popfile.ico
#
+ # windows\UI\pfi_modern.exe
# windows\UI\pfi_headerbmpr.exe
#
***************
*** 85,89 ****
;
; This version of the script has been tested with NSIS 2.0b4 (CVS) after updating it by using
! ; the 11 August 2003 (19:44 GMT) version of the NSIS CVS snapshot.
#--------------------------------------------------------------------------
--- 86,90 ----
;
; This version of the script has been tested with NSIS 2.0b4 (CVS) after updating it by using
! ; the 27 August 2003 (19:44 GMT) version of the NSIS CVS snapshot.
#--------------------------------------------------------------------------
***************
*** 154,160 ****
!ifndef ENGLISH_ONLY
! !define MUI_VERSION "0.6.0 (ML)"
!else
! !define MUI_VERSION "0.6.0 (English)"
!endif
--- 155,161 ----
!ifndef ENGLISH_ONLY
! !define MUI_VERSION "0.6.1 (ML)"
!else
! !define MUI_VERSION "0.6.1 (English)"
!endif
***************
*** 211,219 ****
; representing the following values: Major.Minor.Release.Build
! VIProductVersion "0.6.0.0"
VIAddVersionKey "ProductName" "POPFile Installer Language Testbed"
VIAddVersionKey "Comments" "POPFile Homepage: http://popfile.sf.net"
! VIAddVersionKey "CompanyName" "POPFile Team"
VIAddVersionKey "LegalCopyright" "© 2001-2003 John Graham-Cumming"
VIAddVersionKey "FileDescription" "POPFile Installer Language Testbed"
--- 212,220 ----
; representing the following values: Major.Minor.Release.Build
! VIProductVersion "0.6.1.0"
VIAddVersionKey "ProductName" "POPFile Installer Language Testbed"
VIAddVersionKey "Comments" "POPFile Homepage: http://popfile.sf.net"
! VIAddVersionKey "CompanyName" "The POPFile Project"
VIAddVersionKey "LegalCopyright" "© 2001-2003 John Graham-Cumming"
VIAddVersionKey "FileDescription" "POPFile Installer Language Testbed"
***************
*** 328,331 ****
--- 329,338 ----
;-----------------------------------------
+ ; The banner provided by the default 'modern.exe' UI does not provide much room for the
+ ; two lines of text, e.g. the German version is truncated, so we use a custom UI which
+ ; provides slightly wider text areas. Each area is still limited to a single line of text.
+
+ !define MUI_UI "UI\pfi_modern.exe"
+
; The 'hdr-common.bmp' logo is only 90 x 57 pixels, much smaller than the 150 x 57 pixel
; space provided by the default 'modern_headerbmpr.exe' UI, so we use a custom UI which
***************
*** 443,446 ****
--- 450,454 ----
!insertmacro PFI_LANG_LOAD "Spanish"
!insertmacro PFI_LANG_LOAD "French"
+ !insertmacro PFI_LANG_LOAD "Greek"
!insertmacro PFI_LANG_LOAD "Japanese"
!insertmacro PFI_LANG_LOAD "Korean"
***************
*** 796,799 ****
--- 804,808 ----
!insertmacro UI_LANG_CONFIG "SPANISH" "Español"
!insertmacro UI_LANG_CONFIG "FRENCH" "Francais"
+ !insertmacro UI_LANG_CONFIG "GREEK" "Hellenic"
!insertmacro UI_LANG_CONFIG "JAPANESE" "Nihongo"
!insertmacro UI_LANG_CONFIG "KOREAN" "Korean"
|
|
From: <xue...@us...> - 2003-09-22 12:11:28
|
Update of /cvsroot/popfile/windows/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv8735
Added Files:
UI ReadMe
Log Message:
Notes on how the customised UI files were created.
--- NEW FILE: UI ReadMe ---
=============================================================================
NOTES ON HOW THE CUSTOMISED UI FILES FOR THE POPFILE INSTALLER WERE CREATED
=============================================================================
Last updated: 22 September 2003 (11:50 GMT)
=============================================================================
INTRODUCTION
=============================================================================
The NSIS "Modern User Interface" (MUI) provides a range of general purpose
User Interface (UI) files offering a variety of interface formats. Soon after
work started on modifying the POPFile installer to work with languages other
than English, it was found that these default UI files did not provide enough
room for some of the non-English language strings.
To solve this problem, the following customised UI files have been created:
(1) pfi_modern.exe based upon ${NSISDIR}\Contrib\UIs\modern.exe
(2) pfi_headerbmp.exe based upon ${NSISDIR}\Contrib\UIs\modern_headerbmp.exe
(3) pfi_headerbmpr.exe based upon ${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe
The current versions of these customised UI files are based upon the UI files
provided in the NSIS CVS snapshot of 27 August 2003 (19:44 GMT).
Future updates to the NSIS compiler may not be compatible with these customised
UI files. These notes describe in detail how these files were created, to make
it easier to create updated versions to suit newer NSIS compilers.
'Resource Hacker' (http://www.users.on.net/johnson/resourcehacker/) was used to
create these customised versions of the NSIS MUI UI files.
=============================================================================
'PFI_MODERN.EXE' NOTES
=============================================================================
This UI file contains the resource used to display the banner which appears
when POPFile is being started by the installer and also when an uninstall is
performed during an upgrade installation. The banner's icon has been moved to
the left to allow the width of the two text areas to be increased.
'pfi_modern.exe' v1.1 was created by modifying 'modern.exe', NSIS CVS v1.33
(dated 05-Aug-2003), as follows:
[1] Dialog 111, Control 103 (the icon image)
Left/Top/Width/Height changed from "10, 10, 21, 20"
to " 7, 10, 21, 20"
(i.e. image moved 3 units to the left)
[2] Dialog 111, Control 76 (the upper text area)
Left/Top/Width/Height changed from "40, 10, 120, 10"
to "35, 10, 125, 10"
(i.e left edge moved 5 units to left, width increased by 5 units)
[3] Dialog 111, Control 1030 (the lower text area}
Left/Top/Width/Height changed from "40, 25, 120, 10"
to "35, 25, 125, 10"
(i.e left edge moved 5 units to left, width increased by 5 units)
=============================================================================
'PFI_HEADERBMP.EXE' AND 'PFI_HEADERBMPR.EXE' NOTES
=============================================================================
The standard NSIS "Modern User Interface" (MUI) supports 150 x 57 pixel
bitmaps, placed at the left of the header area (using 'modern_headerbmp.exe')
or at the right (using 'modern_headerbmpr.exe').
The POPFile installer uses a small 'hdr-common.bmp' bitmap logo which is only
90 x 57 pixels. This means more space can be made available in the header area
for the Title and SubTitle text.
The default 150 pixel width is equivalent to 100 dialog units, so a 90 pixel
width is assumed to be 60 dialog units. The bitmap width is reduced to 60
units, leaving 40 units available to increase the width of the two text areas.
=============================================================================
'PFI_HEADERBMP.EXE' CHANGES (bitmap appears at the left of the header area)
=============================================================================
'pfi_headerbmp.exe' v1.1 was created by modifying 'modern_headerbmp.exe',
NSIS CVS v1.5 (dated 05-Aug-2003), as follows:
[1] Dialog 105, Control 1037 (the TITLE text area)
Left/Top/Width/Height changed from "105, 5, 215, 10"
to "65, 5, 255, 10"
(i.e. left edge moved 40 units to left, width increased by 40 units)
[2] Dialog 105, Control 1038 (the SUBTITLE text area)
Left/Top/Width/Height changed from "110, 17, 210, 16"
to "70, 17, 250, 16"
(i.e. left edge moved 40 units to left, width increased by 40 units)
[3] Dialog 105, Control 1046 (the bitmap at the left of the header area)
Left/Top/Width/Height changed from "0, 0, 100, 35"
to "0, 0, 60, 35"
(i.e. width reduced by 40 units)
=============================================================================
'PFI_HEADERBMPR.EXE' CHANGES (bitmap appears at the right of the header area)
=============================================================================
'pfi_headerbmpr.exe' v1.1 was created by modifying 'modern_headerbmpr.exe',
NSIS CVS v1.5 (dated 05-Aug-2003), as follows:
[1] Dialog 105, Control 1037 (the TITLE text area)
Left/Top/Width/Height changed from "10, 5, 215, 10"
to "10, 5, 255, 10"
(i.e. width increased by 40 units)
[2] Dialog 105, Control 1038 (the SUB-TITLE text area)
Left/Top/Width/Height changed from "15, 17, 210, 16"
to "15, 17, 250, 16"
(i.e. width increased by 40 units)
[3] Dialog 105, Control 1046 (the bitmap at the right of the header area)
Left/Top/Width/Height changed from "231, 0, 100, 35"
to "271, 0, 60, 35"
(i.e. left edge moved 40 units to right, width reduced by 40 units)
=============================================================================
(end)
|
|
From: <xue...@us...> - 2003-09-22 12:10:43
|
Update of /cvsroot/popfile/windows/UI In directory sc8-pr-cvs1:/tmp/cvs-serv8600 Added Files: pfi_modern.exe Log Message: Customised UI with banner text width increased (to suit new German translation). --- NEW FILE: pfi_modern.exe --- (This appears to be a binary file; contents omitted.) |
|
From: <xue...@us...> - 2003-09-22 12:09:38
|
Update of /cvsroot/popfile/windows/languages In directory sc8-pr-cvs1:/tmp/cvs-serv8395 Modified Files: German-pfi.nsh Log Message: Updated German translation (looks nicer with 'pfi_modern.exe' UI). Index: German-pfi.nsh =================================================================== RCS file: /cvsroot/popfile/windows/languages/German-pfi.nsh,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** German-pfi.nsh 13 Sep 2003 20:28:13 -0000 1.10 --- German-pfi.nsh 22 Sep 2003 12:09:32 -0000 1.11 *************** *** 60,64 **** !insertmacro PFI_LANG_STRING PFI_LANG_MBRELNOTES_1 "Hinweise zu dieser POPFile-Version anzeigen?" ! !insertmacro PFI_LANG_STRING PFI_LANG_MBRELNOTES_2 "'Ja' wird empfohlen, wenn Sie von einer älteren Version updaten (Sie müssen evtl. Backups VOR dem Update anlegen)" #-------------------------------------------------------------------------- --- 60,64 ---- !insertmacro PFI_LANG_STRING PFI_LANG_MBRELNOTES_1 "Hinweise zu dieser POPFile-Version anzeigen?" ! !insertmacro PFI_LANG_STRING PFI_LANG_MBRELNOTES_2 "Falls Sie von einer älteren Version updaten, sollten Sie 'Ja' wählen. (Sie sollten evtl. Backups VOR dem Update anlegen)" #-------------------------------------------------------------------------- *************** *** 68,72 **** !insertmacro PFI_LANG_STRING DESC_SecPOPFile "Installiert die Kernkomponenten inklusive einer Minimalversion des Perl-Interpreters." !insertmacro PFI_LANG_STRING DESC_SecSkins "Installiert POPFile Skins, mit denen Sie die Benutzeroberfläche von POPFile anpassen können." ! !insertmacro PFI_LANG_STRING DESC_SecLangs "Installiert weitere (nicht-englische) Sprachen für die Benutzeroberfläche." #-------------------------------------------------------------------------- --- 68,72 ---- !insertmacro PFI_LANG_STRING DESC_SecPOPFile "Installiert die Kernkomponenten inklusive einer Minimalversion des Perl-Interpreters." !insertmacro PFI_LANG_STRING DESC_SecSkins "Installiert POPFile Skins, mit denen Sie die Benutzeroberfläche von POPFile anpassen können." ! !insertmacro PFI_LANG_STRING DESC_SecLangs "Installiert Unterstützung für weitere (nicht-englische) Sprachen." #-------------------------------------------------------------------------- *************** *** 85,95 **** !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_STARTUP "POPFile mit Windows starten (läuft unsichtbar im Hintergrund)" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_WARNING "WICHTIGER HINWEIS" ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_MESSAGE "WENN SIE POPFILE UPDATEN: SETUP WIRD DIE EXISTIERENDE VERSION BEENDEN" ; Message Boxes used when validating user's selections ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_MBUNINST_1 "Previous installation found at" ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_MBUNINST_2 "Do you want to uninstall it ?" ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_MBUNINST_3 "'Yes' recommended" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_MBPOP3_1 "Der POP3-Port kann nicht übernommen werden." --- 85,95 ---- !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_STARTUP "POPFile mit Windows starten (läuft unsichtbar im Hintergrund)" !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_WARNING "WICHTIGER HINWEIS" ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_IO_MESSAGE "WENN SIE POPFILE UPDATEN: SETUP WIRD DIE VORHANDENE VERSION BEENDEN, FALLS DIESE IM HINTERGRUND LÄUFT" ; Message Boxes used when validating user's selections ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_MBUNINST_1 "Vorhandene Installation gefunden:" ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_MBUNINST_2 "Wollen Sie diese Deinstallieren?" ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_MBUNINST_3 "Es wird empfohlen, dies zu tun." !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_MBPOP3_1 "Der POP3-Port kann nicht übernommen werden." *************** *** 106,110 **** ; Banner message displayed whilst uninstalling old version ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_BANNER_1 "Please be patient." !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_BANNER_2 "Dies kann einige Sekunden dauern..." --- 106,110 ---- ; Banner message displayed whilst uninstalling old version ! !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_BANNER_1 "Bitte haben Sie einen Moment Geduld." !insertmacro PFI_LANG_STRING PFI_LANG_OPTIONS_BANNER_2 "Dies kann einige Sekunden dauern..." *************** *** 152,156 **** !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_INTRO "Nach der Installation können Sie die Anzahl der Kategorien (und deren Name) ohne Probleme an ihre Bedürfnisse anpassen.\r\n\r\nKategorienamen bestehen aus Kleinbuchstaben, Ziffern von 0 bis 9, Bindestrich oder Unterstrich." !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_CREATE "Erstellen Sie eine neue Kategorie, indem Sie entweder einen Namen aus der Liste wählen oder einen Namen ihrer Wahl eingeben." ! !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_DELETE "Um eine oder mehr Kategorien von der Liste zu löschen, markieren Sie entsprechende(n) 'Entfernen' Box(en) und klicken Sie auf 'Weiter'." !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_LISTHDR "Bereits eingerichtete Kategorien" !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_REMOVE "Entfernen" --- 152,156 ---- !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_INTRO "Nach der Installation können Sie die Anzahl der Kategorien (und deren Name) ohne Probleme an ihre Bedürfnisse anpassen.\r\n\r\nKategorienamen bestehen aus Kleinbuchstaben, Ziffern von 0 bis 9, Bindestrich oder Unterstrich." !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_CREATE "Erstellen Sie eine neue Kategorie, indem Sie entweder einen Namen aus der Liste wählen oder einen Namen ihrer Wahl eingeben." ! !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_DELETE "Um eine oder mehr Kategorien von der Liste zu löschen, markieren Sie die entsprechenden 'Entfernen' Kästchen und klicken Sie auf 'Weiter'." !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_LISTHDR "Bereits eingerichtete Kategorien" !insertmacro PFI_LANG_STRING PFI_LANG_CBP_IO_REMOVE "Entfernen" *************** *** 184,188 **** !insertmacro PFI_LANG_STRING PFI_LANG_CBP_MBCONTERR_3 "Sie müssen MINDESTENS ZWEI Kategorien anlegen, bevor Sie die Installation fortsetzen können." ! !insertmacro PFI_LANG_STRING PFI_LANG_CBP_MBDONE_1 "Kategeforien zur Nutzung durch POPFile wurden angelegt." !insertmacro PFI_LANG_STRING PFI_LANG_CBP_MBDONE_2 "Sollen diese Kategorien für POPFile eingerichtet werden?" !insertmacro PFI_LANG_STRING PFI_LANG_CBP_MBDONE_3 "Wählen Sie 'Nein', wenn Sie Ihre Auswahl korrigieren möchten." --- 184,188 ---- !insertmacro PFI_LANG_STRING PFI_LANG_CBP_MBCONTERR_3 "Sie müssen MINDESTENS ZWEI Kategorien anlegen, bevor Sie die Installation fortsetzen können." ! !insertmacro PFI_LANG_STRING PFI_LANG_CBP_MBDONE_1 "Kategorien zur Nutzung durch POPFile wurden angelegt." !insertmacro PFI_LANG_STRING PFI_LANG_CBP_MBDONE_2 "Sollen diese Kategorien für POPFile eingerichtet werden?" !insertmacro PFI_LANG_STRING PFI_LANG_CBP_MBDONE_3 "Wählen Sie 'Nein', wenn Sie Ihre Auswahl korrigieren möchten." |
|
From: <jgr...@us...> - 2003-09-20 21:33:56
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv22092
Added Files:
popfile-tray.pl
Log Message:
The PerlTray wrapper for POPFile
--- NEW FILE: popfile-tray.pl ---
#!/usr/bin/perl
# ---------------------------------------------------------------------------------------------
#
# popfile-tray.pl --- Message analyzer and sorter (Windows loader used with PerlTray)
#
# Acts as a server and client designed to sit between a real mail/news client and a real mail/
# news server using POP3. Inserts an extra header X-Text-Classification: into the header to
# tell the client which category the message belongs in and much more...
#
# Copyright (c) 2001-2003 John Graham-Cumming
#
# This file is part of POPFile
#
# POPFile is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# POPFile is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with POPFile; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ---------------------------------------------------------------------------------------------
use strict;
use locale;
use POPFile::Loader;
use PerlTray;
# POPFile is actually loaded by the POPFile::Loader object which does all
# the work
our $POPFile = POPFile::Loader->new();
# ---------------------------------------------------------------------------------------------
#
# PopupMenu
#
# Called by PerlTray when it needs the content of the popup menu
#
# ---------------------------------------------------------------------------------------------
sub PopupMenu
{
my $url = 'http://127.0.0.1:' . $POPFile->module_config( 'html', 'port' );
return [ [ "*POPFile UI", "Execute '$url'" ],
[ "--------" ],
[ "Shutdown POPFile", \&popfile_shutdown ] ];
}
# ---------------------------------------------------------------------------------------------
#
# ToolTip
#
# Called by PerlTray when it needs the to show a tool tip on the tray icon
#
# ---------------------------------------------------------------------------------------------
sub ToolTip
{
return "POPFile";
}
# ---------------------------------------------------------------------------------------------
#
# Timer
#
# Called by PerlTray when the timer expires
#
# ---------------------------------------------------------------------------------------------
sub Timer
{
SetTimer( 0 );
if ( !$POPFile->CORE_service(1) ) {
popfile_shutdown();
}
SetTimer( 50 );
}
# ---------------------------------------------------------------------------------------------
#
# popfile_shutdown
#
# Called by PerlTray when the user click Shutdown on the pop up menu
#
# ---------------------------------------------------------------------------------------------
sub popfile_shutdown
{
$POPFile->CORE_stop();
exit(0);
}
# Indicate that we should create output on STDOUT (the POPFile
# load sequence) and initialize with the version
$POPFile->debug(1);
$POPFile->CORE_loader_init();
$POPFile->CORE_version(0, 20, 0);
# Redefine POPFile's signals
$POPFile->CORE_signals();
# Create the main objects that form the core of POPFile. Consists of the configuration
# modules, the classifier, the UI (currently HTML based), platform specific code,
# and the POP3 proxy. The link the components together, intialize them all, load
# the configuration from disk, start the modules running
$POPFile->CORE_load();
$POPFile->CORE_link_components();
$POPFile->CORE_initialize();
$POPFile->CORE_config();
$POPFile->CORE_start();
# We terminate here because that lets PerlTray start and it will call the Timer
# function above
Timer();
|
|
From: <jgr...@us...> - 2003-09-20 21:28:58
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv21327/POPFile
Modified Files:
Loader.pm
Log Message:
Remove the version method from Loader because there was already CORE_version doing the same thing
Index: Loader.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Loader.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Loader.pm 19 Sep 2003 20:18:52 -0000 1.9
--- Loader.pm 20 Sep 2003 21:28:23 -0000 1.10
***************
*** 567,571 ****
}
! print "\n\nPOPFile Engine ", $self->version(), " running\n" if $self->{debug__};
flush STDOUT;
}
--- 567,571 ----
}
! print "\n\nPOPFile Engine ", $self->CORE_version(), " running\n" if $self->{debug__};
flush STDOUT;
}
***************
*** 750,760 ****
# GETTER/SETTER
-
- sub version
- {
- my ( $self ) = @_;
-
- return $self->{version_string__};
- }
sub debug
--- 750,753 ----
|
|
From: <jgr...@us...> - 2003-09-19 21:21:54
|
Update of /cvsroot/popfile/engine/Platform In directory sc8-pr-cvs1:/tmp/cvs-serv21231 Removed Files: POPFileIcon.dll Log Message: Remove POPFileIcon.DLL code as no longer needed --- POPFileIcon.dll DELETED --- |
|
From: <jgr...@us...> - 2003-09-19 21:20:14
|
Update of /cvsroot/popfile/windows/POPFileIcon In directory sc8-pr-cvs1:/tmp/cvs-serv20937 Removed Files: POPFileIcon.dsp POPFileIcon.dsw icon.cpp icon.def icon.h icon.rc icon.sln icon.suo icon.vcproj resource.h stdafx.cpp stdafx.h Log Message: Remove POPFileIcon.DLL code as no longer needed --- POPFileIcon.dsp DELETED --- --- POPFileIcon.dsw DELETED --- --- icon.cpp DELETED --- --- icon.def DELETED --- --- icon.h DELETED --- --- icon.rc DELETED --- --- icon.sln DELETED --- --- icon.suo DELETED --- --- icon.vcproj DELETED --- --- resource.h DELETED --- --- stdafx.cpp DELETED --- --- stdafx.h DELETED --- |
|
From: <jgr...@us...> - 2003-09-19 21:07:02
|
Update of /cvsroot/popfile/engine/languages In directory sc8-pr-cvs1:/tmp/cvs-serv18299 Modified Files: Deutsch.msg Log Message: Update to German language file Index: Deutsch.msg =================================================================== RCS file: /cvsroot/popfile/engine/languages/Deutsch.msg,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Deutsch.msg 20 Aug 2003 01:46:16 -0000 1.18 --- Deutsch.msg 19 Sep 2003 21:06:58 -0000 1.19 *************** *** 1,7 **** --- 1,25 ---- # Copyright (c) 2001-2003 John Graham-Cumming + # + # This file is part of POPFile + # + # POPFile is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # POPFile is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with POPFile; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # # Identify the language and character set used for the interface LanguageCode de LanguageCharset ISO-8859-1 + LanguageDirection ltr # This is used to get the appropriate subdirectory for the manual *************** *** 20,29 **** From Absender Subject Betreff ! Cc CC Classification Einstufung Reclassify Neu einstufen Probability Wahrscheinlichkeit Scores Auswertung ! QuickMagnets Blitz-Magnete Undo widerrufen Close Schließen --- 38,47 ---- From Absender Subject Betreff ! Cc Cc Classification Einstufung Reclassify Neu einstufen Probability Wahrscheinlichkeit Scores Auswertung ! QuickMagnets Sofort-Magnete Undo widerrufen Close Schließen *************** *** 82,85 **** --- 100,106 ---- Configuration_NNTPPort NNTP Port Configuration_NNTPUpdate Neuer NNTP Port: %s - Diese Änderung wird erst nach einem Neustart von POPFile wirksam. + Configuration_POPFork Simultane POP3-Verbindungen erlauben + Configuration_SMTPFork Simultane SMPT-Verbindungen erlauben + Configuration_NNTPFork Simultane NNTP-Verbindungen erlauben Configuration_POP3Separator POP3 Server:Port:Benutzer Trennzeichen Configuration_NNTPSeparator NNTP Server:Port:Benutzer Trennzeichen *************** *** 143,148 **** History_MagnetUsed Magnet benutzt History_MagnetBecause <b>Magnet benutzt</b><p>Eingestuft als <font color="%s">%s</font> durch Magnet %s </p> ! History_ChangedTo Geändert: <font color="%s">%s ! History_Already Bereits neu eingestuft als <font color="%s">%s</font> History_RemoveAll Alle entfernen History_RemovePage Diese Seite entfernen --- 164,169 ---- History_MagnetUsed Magnet benutzt History_MagnetBecause <b>Magnet benutzt</b><p>Eingestuft als <font color="%s">%s</font> durch Magnet %s </p> ! History_ChangedTo Geändert: <font color="%s">%s</font> ! History_Already Neu eingestuft als <font color="%s">%s</font> History_RemoveAll Alle entfernen History_RemovePage Diese Seite entfernen *************** *** 254,257 **** --- 275,280 ---- Windows_TrayIcon POPFile-Symbol neben der Uhr anzeigen? + Windows_Console Nachrichten in einem Konsolenfenster ausgeben? + Windows_NextTime <p><font color="red">Diese Änderung wird erst beim nächsten Start von POPFile wirksam.</font> Header_MenuSummary Diese Tabelle ist das Navigationsmenü, das Zugang zu den einzelnen Bereichen des Kontrollzentrums bietet. |
|
From: <jgr...@us...> - 2003-09-19 20:18:57
|
Update of /cvsroot/popfile/engine/Platform
In directory sc8-pr-cvs1:/tmp/cvs-serv8332/Platform
Modified Files:
MSWin32.pm
Log Message:
MAKE POPFILE BE A TRUE EXE ON WINDOWS
ADDED ATTACHMENT PSEUDOWORDS
Makefile:
At rules for making a variety of POPFile executables:
popfile.exe Loader that picks one of the following four to run:
popfileif.exe Run POPFile in foreground with a tray icon
popfileib.exe Run POPFile in background with a tray icon
popfilef.exe Run POPFile in the foreground
popfileb.exe Run POPFile in the background
Each executable is built with either PerlTray (for those with system
tray icons) or PerlApp (for those with no icon).
popfile-tray.pl:
Equivalent of popfile.pl but with hooks for use by PerlTray for
showing the icon and handling the popup menu.
popfile-windows.pl:
This is the small wrapper that becomes popfile.exe and decides which
version of POPFile to load.
languages/English.msg:
Added the message for the console output option and to warn the user
that the change isn't going to take affect until the next restart.
Platform/MSWin32.pm:
This just contains code now for handling the options windows_trayicon
and windows_console.
Classifier/Bayes.pm:
Removed the second blessing of ourselves because it was not needed.
Classifier/MailParse.pm:
Added pseudowords for attachment names and attachment extensions via a
patch that was submitted.
POPFile/Loader.pm:
New public function module_config() allows a user of the loader to access
configuration items without knowing the internals of Loader.
popfilew.pl:
Removed. This file is replaced by popfile-windows.pl.
Index: MSWin32.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Platform/MSWin32.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** MSWin32.pm 12 Sep 2003 00:34:36 -0000 1.11
--- MSWin32.pm 19 Sep 2003 20:18:52 -0000 1.12
***************
*** 63,66 ****
--- 63,67 ----
$self->config_( 'trayicon', 1 );
+ $self->config_( 'console', 0 );
$self->register_configuration_item_( 'configuration',
***************
*** 68,71 ****
--- 69,76 ----
$self );
+ $self->register_configuration_item_( 'configuration',
+ 'windows_console',
+ $self );
+
return 1;
}
***************
*** 110,113 ****
--- 115,138 ----
}
+ if ( $name eq 'windows_console' ) {
+ $body .= "<span class=\"configurationLabel\">$$language{Windows_Console}:</span><br />\n";
+ $body .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\"><tr><td nowrap=\"nowrap\">\n";
+
+ if ( $self->config_( 'console' ) == 0 ) {
+ $body .= "<form action=\"/configuration\">\n";
+ $body .= "<span class=\"securityWidgetStateOff\">$$language{No}</span>\n";
+ $body .= "<input type=\"submit\" class=\"toggleOn\" id=\"windowConsoleOn\" name=\"toggle\" value=\"$$language{ChangeToYes}\" />\n";
+ $body .= "<input type=\"hidden\" name=\"windows_console\" value=\"1\" />\n";
+ $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n";
+ } else {
+ $body .= "<form action=\"/configuration\">\n";
+ $body .= "<span class=\"securityWidgetStateOn\">$$language{Yes}</span>\n";
+ $body .= "<input type=\"submit\" class=\"toggleOn\" id=\"windowConsoleOff\" name=\"toggle\" value=\"$$language{ChangeToNo}\" />\n";
+ $body .= "<input type=\"hidden\" name=\"windows_console\" value=\"0\" />\n";
+ $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n";
+ }
+ $body .= "</td></tr></table>\n";
+ }
+
return $body;
}
***************
*** 132,145 ****
if ( defined($$form{windows_trayicon}) ) {
$self->config_( 'trayicon', $$form{windows_trayicon} );
! if ( $$form{windows_trayicon} == 0 ) {
! $self->{hideicon__} = Win32::API->new( "Platform/POPFileIcon.dll", "HideIcon", "", "N" );
! $self->{hideicon__}->Call();
! undef $self->{hideicon__};
! }
}
}
! return '';
}
--- 157,172 ----
if ( defined($$form{windows_trayicon}) ) {
$self->config_( 'trayicon', $$form{windows_trayicon} );
+ return $$language{Windows_NextTime};
+ }
+ }
! if ( $name eq 'windows_console' ) {
! if ( defined($$form{windows_console}) ) {
! $self->config_( 'console', $$form{windows_console} );
! return $$language{Windows_NextTime};
}
}
! return '';
}
|
|
From: <jgr...@us...> - 2003-09-19 20:18:56
|
Update of /cvsroot/popfile/engine/languages
In directory sc8-pr-cvs1:/tmp/cvs-serv8332/languages
Modified Files:
English.msg
Log Message:
MAKE POPFILE BE A TRUE EXE ON WINDOWS
ADDED ATTACHMENT PSEUDOWORDS
Makefile:
At rules for making a variety of POPFile executables:
popfile.exe Loader that picks one of the following four to run:
popfileif.exe Run POPFile in foreground with a tray icon
popfileib.exe Run POPFile in background with a tray icon
popfilef.exe Run POPFile in the foreground
popfileb.exe Run POPFile in the background
Each executable is built with either PerlTray (for those with system
tray icons) or PerlApp (for those with no icon).
popfile-tray.pl:
Equivalent of popfile.pl but with hooks for use by PerlTray for
showing the icon and handling the popup menu.
popfile-windows.pl:
This is the small wrapper that becomes popfile.exe and decides which
version of POPFile to load.
languages/English.msg:
Added the message for the console output option and to warn the user
that the change isn't going to take affect until the next restart.
Platform/MSWin32.pm:
This just contains code now for handling the options windows_trayicon
and windows_console.
Classifier/Bayes.pm:
Removed the second blessing of ourselves because it was not needed.
Classifier/MailParse.pm:
Added pseudowords for attachment names and attachment extensions via a
patch that was submitted.
POPFile/Loader.pm:
New public function module_config() allows a user of the loader to access
configuration items without knowing the internals of Loader.
popfilew.pl:
Removed. This file is replaced by popfile-windows.pl.
Index: English.msg
===================================================================
RCS file: /cvsroot/popfile/engine/languages/English.msg,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** English.msg 10 Sep 2003 18:26:29 -0000 1.42
--- English.msg 19 Sep 2003 20:18:52 -0000 1.43
***************
*** 275,278 ****
--- 275,280 ----
Windows_TrayIcon Show POPFile icon in Windows system tray?
+ Windows_Console Output POPFile message in a console window?
+ Windows_NextTime <p><font color="red">This change will not take effect until the next time you start POPFile</font>
Header_MenuSummary This table is the navigation menu which allows access to each of the different pages of the control center.
|
|
From: <jgr...@us...> - 2003-09-19 20:18:56
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv8332
Modified Files:
Makefile
Added Files:
popfile-windows.pl
Removed Files:
popfilew.pl
Log Message:
MAKE POPFILE BE A TRUE EXE ON WINDOWS
ADDED ATTACHMENT PSEUDOWORDS
Makefile:
At rules for making a variety of POPFile executables:
popfile.exe Loader that picks one of the following four to run:
popfileif.exe Run POPFile in foreground with a tray icon
popfileib.exe Run POPFile in background with a tray icon
popfilef.exe Run POPFile in the foreground
popfileb.exe Run POPFile in the background
Each executable is built with either PerlTray (for those with system
tray icons) or PerlApp (for those with no icon).
popfile-tray.pl:
Equivalent of popfile.pl but with hooks for use by PerlTray for
showing the icon and handling the popup menu.
popfile-windows.pl:
This is the small wrapper that becomes popfile.exe and decides which
version of POPFile to load.
languages/English.msg:
Added the message for the console output option and to warn the user
that the change isn't going to take affect until the next restart.
Platform/MSWin32.pm:
This just contains code now for handling the options windows_trayicon
and windows_console.
Classifier/Bayes.pm:
Removed the second blessing of ourselves because it was not needed.
Classifier/MailParse.pm:
Added pseudowords for attachment names and attachment extensions via a
patch that was submitted.
POPFile/Loader.pm:
New public function module_config() allows a user of the loader to access
configuration items without knowing the internals of Loader.
popfilew.pl:
Removed. This file is replaced by popfile-windows.pl.
--- NEW FILE: popfile-windows.pl ---
#!/usr/bin/perl
# ---------------------------------------------------------------------------------------------
#
# popfile-windows.pl --- Message analyzer and sorter (Windows loader)
#
# Figures out which is four executables to run based on windows options
#
# popfileif.exe Run POPFile in foreground with a tray icon
# popfileib.exe Run POPFile in background with a tray icon
# popfilef.exe Run POPFile in the foreground
# popfileb.exe Run POPFile in the background
#
# Copyright (c) 2001-2003 John Graham-Cumming
#
# This file is part of POPFile
#
# POPFile is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# POPFile is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with POPFile; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ---------------------------------------------------------------------------------------------
use strict;
use locale;
use POPFile::Configuration;
use POPFile::MQ;
use Platform::MSWin32;
# Load the minimal amount of POPFile to get reliable access to the
# configuration options and then figure out which popfileXX.exe to run
my $c = new POPFile::Configuration;
my $w = new Platform::MSWin32;
my $mq = new POPFile::MQ;
$w->mq( $mq );
$w->configuration( $c );
$c->configuration( $c );
$c->initialize();
$w->initialize();
$c->load_configuration();
my $i = $w->config_( 'trayicon' )?'i':'';
my $f = $w->config_( 'console' )?'f':'b';
my $popfile_exe = "popfile$i$f.exe";
exec $popfile_exe;
Index: Makefile
===================================================================
RCS file: /cvsroot/popfile/engine/Makefile,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Makefile 15 Sep 2003 14:55:36 -0000 1.21
--- Makefile 19 Sep 2003 20:18:52 -0000 1.22
***************
*** 45,49 ****
# Builds the tray application using PerlTray
! winexe: popfile.exe popfileb.exe
TRAY_OPTIONS = --exe $@ --force --clean --dependent --xclude --icon ../windows/POPFileIcon/popfile.ico --script $< --info CompanyName="The POPFile Project" --info LegalCopyright="Copyright (c) 2003 John Graham-Cumming" --info ProductName=POPFile --info ProductVersion=$(POPFILE_VERSION).0 --info FileDescription=POPFile --info FileVersion=$(POPFILE_VERSION).0
--- 45,49 ----
# Builds the tray application using PerlTray
! winexe: popfile.exe popfileb.exe popfilef.exe popfileib.exe popfileif.exe
TRAY_OPTIONS = --exe $@ --force --clean --dependent --xclude --icon ../windows/POPFileIcon/popfile.ico --script $< --info CompanyName="The POPFile Project" --info LegalCopyright="Copyright (c) 2003 John Graham-Cumming" --info ProductName=POPFile --info ProductVersion=$(POPFILE_VERSION).0 --info FileDescription=POPFile --info FileVersion=$(POPFILE_VERSION).0
***************
*** 52,60 ****
endif
! popfile.exe: popfilew.pl POPFile/Loader.pm
perltray --nogui $(TRAY_OPTIONS)
! popfileb.exe: popfilew.pl POPFile/Loader.pm
perltray $(TRAY_OPTIONS)
# windows builds the Windows installer
--- 52,69 ----
endif
! popfile.exe: popfile-windows.pl
! perlapp --gui $(TRAY_OPTIONS)
!
! popfileif.exe: popfile-tray.pl POPFile/Loader.pm
perltray --nogui $(TRAY_OPTIONS)
! popfileib.exe: popfile-tray.pl POPFile/Loader.pm
perltray $(TRAY_OPTIONS)
+
+ popfilef.exe: popfile.pl POPFile/Loader.pm
+ perlapp $(TRAY_OPTIONS)
+
+ popfileb.exe: popfile.pl POPFile/Loader.pm
+ perlapp --gui $(TRAY_OPTIONS)
# windows builds the Windows installer
--- popfilew.pl DELETED ---
|
|
From: <jgr...@us...> - 2003-09-19 20:18:56
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv8332/Classifier
Modified Files:
Bayes.pm MailParse.pm
Log Message:
MAKE POPFILE BE A TRUE EXE ON WINDOWS
ADDED ATTACHMENT PSEUDOWORDS
Makefile:
At rules for making a variety of POPFile executables:
popfile.exe Loader that picks one of the following four to run:
popfileif.exe Run POPFile in foreground with a tray icon
popfileib.exe Run POPFile in background with a tray icon
popfilef.exe Run POPFile in the foreground
popfileb.exe Run POPFile in the background
Each executable is built with either PerlTray (for those with system
tray icons) or PerlApp (for those with no icon).
popfile-tray.pl:
Equivalent of popfile.pl but with hooks for use by PerlTray for
showing the icon and handling the popup menu.
popfile-windows.pl:
This is the small wrapper that becomes popfile.exe and decides which
version of POPFile to load.
languages/English.msg:
Added the message for the console output option and to warn the user
that the change isn't going to take affect until the next restart.
Platform/MSWin32.pm:
This just contains code now for handling the options windows_trayicon
and windows_console.
Classifier/Bayes.pm:
Removed the second blessing of ourselves because it was not needed.
Classifier/MailParse.pm:
Added pseudowords for attachment names and attachment extensions via a
patch that was submitted.
POPFile/Loader.pm:
New public function module_config() allows a user of the loader to access
configuration items without knowing the internals of Loader.
popfilew.pl:
Removed. This file is replaced by popfile-windows.pl.
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.197
retrieving revision 1.198
diff -C2 -d -r1.197 -r1.198
*** Bayes.pm 15 Sep 2003 14:55:36 -0000 1.197
--- Bayes.pm 19 Sep 2003 20:18:52 -0000 1.198
***************
*** 120,124 ****
$self->name( 'bayes' );
! return bless $self, $type;
}
--- 120,124 ----
$self->name( 'bayes' );
! return $self;
}
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.160
retrieving revision 1.161
diff -C2 -d -r1.160 -r1.161
*** MailParse.pm 11 Sep 2003 08:03:20 -0000 1.160
--- MailParse.pm 19 Sep 2003 20:18:52 -0000 1.161
***************
*** 82,85 ****
--- 82,87 ----
"|samp|small|span|strike|strong|sub|sup|tt|u|var"; # PROFILE BLOCK STOP
+ my $eol = "\015\012";
+
#----------------------------------------------------------------------------
# new
***************
*** 1212,1218 ****
}
! # If we have an email header then just keep the part after the :
! if ( $line =~ /^([A-Za-z-]+):[ \t]*([^\n\r]*)/ ) {
# Parse the last header
--- 1214,1227 ----
}
! # Append to argument if the next line begins with whitespace (isn't a new header)
! if ( $line =~ /^([\t ].+)([^\r\n]+)/ ) {
! $self->{argument__} .= "$eol$1$2";
! next;
! }
!
! # If we have an email header then split it into the header and its argument
!
! if ( $line =~ /^([A-Za-z\-]+):[ \t]*([^\n\r]*)/ ) {
# Parse the last header
***************
*** 1227,1235 ****
}
- # Append to argument if the next line begins with whitespace (isn't a new header)
-
- if ( $line =~ /^([\t ].*?)(\r\n|\r|\n)/ ) {
- $self->{argument__} .= "\015\012" . $1;
- }
next;
}
--- 1236,1239 ----
***************
*** 1412,1416 ****
}
-
# ---------------------------------------------------------------------------------------------
#
--- 1416,1419 ----
***************
*** 1542,1546 ****
}
}
! return ($mime, $encoding);
}
--- 1545,1554 ----
}
}
!
! if ( $argument =~ /name=\"(.*)\"/i ) {
! $self->add_attachment_filename( $1 );
! }
!
! return ( $mime, $encoding );
}
***************
*** 1565,1568 ****
--- 1573,1581 ----
$argument = $self->decode_string($argument) unless ($header =~ /^(Received|Content\-Type|Content\-Disposition)$/i);
+ if ( $header =~ /^Content-Disposition$/i ) {
+ $self->handle_disposition( $argument );
+ return ( $mime, $encoding );
+ }
+
add_line( $self, $argument, 0, $prefix );
***************
*** 1570,1573 ****
--- 1583,1670 ----
}
+ # ---------------------------------------------------------------------------------------------
+ #
+ # match_attachment_filename - Matches a line like 'attachment; filename="<filename>"
+ #
+ # $line The line to match
+ # Returns The first match (= "attchment" if found)
+ # The second match (= name of the file if found)
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub match_attachment_filename
+ {
+ my ( $self, $line ) = @_;
+
+ $line =~ /\s*(.*);\s*filename=\"(.*)\"/;
+
+ return ( $1, $2 );
+ }
+
+ # ---------------------------------------------------------------------------------------------
+ #
+ # file_extension - Splits a filename into name and extension
+ #
+ # $filename The filename to split
+ # Returns The name of the file
+ # The extension of the file
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub file_extension
+ {
+ my ( $self, $filename ) = @_;
+
+ $filename =~ s/(.*)\.(.*)$//;
+
+ if ( length( $1 ) > 0 ) {
+ return ( $1, $2 );
+ } else {
+ return ( $filename, "" );
+ }
+ }
+ # ---------------------------------------------------------------------------------------------
+ #
+ # add_attachment_filename - Adds a file name and extension as pseudo words attchment_name
+ # and attachment_ext
+ #
+ # $filename The filename to add to the list of words
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub add_attachment_filename
+ {
+ my ( $self, $filename ) = @_;
+
+ if ( length( $filename ) > 0) {
+ print "Add filename $filename\n" if $self->{debug};
+
+ my ( $name, $ext ) = $self->file_extension( $filename );
+
+ if ( length( $name ) > 0) {
+ $self->update_pseudoword( 'mimename', $name, 0, $name );
+ }
+
+ if ( length( $ext ) > 0 ) {
+ $self->update_pseudoword( 'mimeextension', $ext, 0, $ext );
+ }
+ }
+ }
+
+ # ---------------------------------------------------------------------------------------------
+ #
+ # handle_disposition - Parses Content-Disposition header to extract filename.
+ # If filename found, at the file name and extension to the word list
+ #
+ # $params The parameters of the Content-Disposition header
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub handle_disposition
+ {
+ my ( $self, $params ) = @_;
+
+ my ( $attachment, $filename ) = $self->match_attachment_filename( $params );
+
+ if ( $attachment eq 'attachment' ) {
+ $self->add_attachment_filename( $filename ) ;
+ }
+ }
# ---------------------------------------------------------------------------------------------
***************
*** 1579,1583 ****
#
# ---------------------------------------------------------------------------------------------
-
sub splitline
{
--- 1676,1679 ----
|
|
From: <jgr...@us...> - 2003-09-19 20:18:56
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv8332/POPFile
Modified Files:
Loader.pm
Log Message:
MAKE POPFILE BE A TRUE EXE ON WINDOWS
ADDED ATTACHMENT PSEUDOWORDS
Makefile:
At rules for making a variety of POPFile executables:
popfile.exe Loader that picks one of the following four to run:
popfileif.exe Run POPFile in foreground with a tray icon
popfileib.exe Run POPFile in background with a tray icon
popfilef.exe Run POPFile in the foreground
popfileb.exe Run POPFile in the background
Each executable is built with either PerlTray (for those with system
tray icons) or PerlApp (for those with no icon).
popfile-tray.pl:
Equivalent of popfile.pl but with hooks for use by PerlTray for
showing the icon and handling the popup menu.
popfile-windows.pl:
This is the small wrapper that becomes popfile.exe and decides which
version of POPFile to load.
languages/English.msg:
Added the message for the console output option and to warn the user
that the change isn't going to take affect until the next restart.
Platform/MSWin32.pm:
This just contains code now for handling the options windows_trayicon
and windows_console.
Classifier/Bayes.pm:
Removed the second blessing of ourselves because it was not needed.
Classifier/MailParse.pm:
Added pseudowords for attachment names and attachment extensions via a
patch that was submitted.
POPFile/Loader.pm:
New public function module_config() allows a user of the loader to access
configuration items without knowing the internals of Loader.
popfilew.pl:
Removed. This file is replaced by popfile-windows.pl.
Index: Loader.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Loader.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Loader.pm 12 Sep 2003 00:34:36 -0000 1.8
--- Loader.pm 19 Sep 2003 20:18:52 -0000 1.9
***************
*** 765,768 ****
--- 765,775 ----
}
+ sub module_config
+ {
+ my ( $self, $module, $item, $value ) = @_;
+
+ return $self->{components__}{core}{config}->module_config_( $module, $item, $value );
+ }
+
1;
|
|
From: <jgr...@us...> - 2003-09-19 20:12:17
|
Update of /cvsroot/popfile/engine/manual/jp
In directory sc8-pr-cvs1:/tmp/cvs-serv12909
Modified Files:
email.html
Added Files:
o_filter1.gif o_filter2.gif o_popfile1.gif o_popfile2.gif
o_popfile3.gif
Log Message:
Merged patch that provides Japanese screen shots of Outlook
--- NEW FILE: o_filter1.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: o_filter2.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: o_popfile1.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: o_popfile2.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: o_popfile3.gif ---
(This appears to be a binary file; contents omitted.)
Index: email.html
===================================================================
RCS file: /cvsroot/popfile/engine/manual/jp/email.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** email.html 11 Sep 2003 22:30:33 -0000 1.2
--- email.html 19 Sep 2003 13:20:33 -0000 1.3
***************
*** 145,155 ****
<ul>
! <li>Outlook Ìj
[æèuc[v->udq[ AJEgvðIÑÜ·Budq[ AJEgvÌ_CAO{bNXªJ«Ü·B <a href=../o_popfile1.gif>[XN[Vbg]</a>
<li>uù¶Ìdq[ AJEgÌ\¦ÆÏXvðIÑAuÖvðNbNµÜ·BPOPFile ðgp·éAJEgðIÑAuÏX...vðNbNµÜ·B
! uóM[ T[o[(POP3)vÆu[U[¼vÌlðЩ¦Ä¨«Ü·B<a href=../o_popfile2.gif>[XN[Vbg]</a>
! <li>uóM[ T[o[(POP3)vÌlð <b>127.0.0.1</b> ÉÏXµAu[U[¼vÌlͳÌuóM[ T[o[(POP3)vÌlƳÌu[U[¼vÆðRÅÂȰ½lÉÏXµÜ·B <a href=../o_popfile3.gif>[XN[Vbg]</a>
<li>ÂÜèA³ÌuóM[ T[o[(POP3)vÌlª <b>my.mail.com</b> Åu[U[¼vª <b>jdoe</b> ¾Æ·éÆAVµ¢u[U[¼vÍ <b>my.mail.com:jdoe</b> ÆÈèÜ·B
--- 145,155 ----
<ul>
! <li>Outlook Ìj
[æèuc[v->udq[ AJEgvðIÑÜ·Budq[ AJEgvÌ_CAO{bNXªJ«Ü·B <a href=./o_popfile1.gif>[XN[Vbg]</a>
<li>uù¶Ìdq[ AJEgÌ\¦ÆÏXvðIÑAuÖvðNbNµÜ·BPOPFile ðgp·éAJEgðIÑAuÏX...vðNbNµÜ·B
! uóM[ T[o[(POP3)vÆu[U[¼vÌlðЩ¦Ä¨«Ü·B<a href=./o_popfile2.gif>[XN[Vbg]</a>
! <li>uóM[ T[o[(POP3)vÌlð <b>127.0.0.1</b> ÉÏXµAu[U[¼vÌlͳÌuóM[ T[o[(POP3)vÌlƳÌu[U[¼vÆðRÅÂȰ½lÉÏXµÜ·B <a href=./o_popfile3.gif>[XN[Vbg]</a>
<li>ÂÜèA³ÌuóM[ T[o[(POP3)vÌlª <b>my.mail.com</b> Åu[U[¼vª <b>jdoe</b> ¾Æ·éÆAVµ¢u[U[¼vÍ <b>my.mail.com:jdoe</b> ÆÈèÜ·B
***************
*** 310,316 ****
<ul>
! <li>Outlook Ìj
[æèuc[v->u©®dóEBU[h...vðIÑÜ·B<a href=../o_filter1.gif>[XN[Vbg]</a>
! <li>©®dóEBU[hªJ«Ü·BuVKì¬...vðNbNµAuVµ¢[ðì¬vðIÑÜ·B<a href=../o_filter2.gif>[XN[Vbg]</a>
<li>Outlook Í[ÌtB^Oª®SÉobNOEhÅsíê鿤ÉAdóÉ <b>X-Text-Classification</b> wb_[ðg¤±ÆªÅ«Ü·BuÖvðNbNµA<i>bZ[Wwb_[ÉÁè̶ªÜÜêéê</i> ðIÑÜ·B
--- 310,316 ----
<ul>
! <li>Outlook Ìj
[æèuc[v->u©®dóEBU[h...vðIÑÜ·B<a href=./o_filter1.gif>[XN[Vbg]</a>
! <li>©®dóEBU[hªJ«Ü·BuVKì¬...vðNbNµAuVµ¢[ðì¬vðIÑÜ·B<a href=./o_filter2.gif>[XN[Vbg]</a>
<li>Outlook Í[ÌtB^Oª®SÉobNOEhÅsíê鿤ÉAdóÉ <b>X-Text-Classification</b> wb_[ðg¤±ÆªÅ«Ü·BuÖvðNbNµA<i>bZ[Wwb_[ÉÁè̶ªÜÜêéê</i> ðIÑÜ·B
|
|
From: <xue...@us...> - 2003-09-19 19:58:53
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv17535
Modified Files:
stop_popfile.nsi
Log Message:
Take action when default REPORT option is supplied (instead of assuming it is the default).
Index: stop_popfile.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/stop_popfile.nsi,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** stop_popfile.nsi 18 Sep 2003 14:33:15 -0000 1.3
--- stop_popfile.nsi 19 Sep 2003 11:34:45 -0000 1.4
***************
*** 29,33 ****
#
# There is also an optional parameter which selects the reporting mode:
! # /SHOWERRORS, /SHOWALL or /NONE. (/NONE is used as the default if no mode is supplied)
#
# If '/SHOWERRORS' is specified then a message will be shown if any errors were detected
--- 29,33 ----
#
# There is also an optional parameter which selects the reporting mode:
! # /SHOWERRORS, /SHOWALL or /SHOWNONE. (/SHOWNONE is used as the default if no mode is supplied)
#
# If '/SHOWERRORS' is specified then a message will be shown if any errors were detected
***************
*** 36,40 ****
# If '/SHOWALL' is specified then a success/fail message will always be shown.
#
! # If '/NONE' is specified then no messages are displayed.
#
# Uppercase or lowercase can be used for this optional parameter.
--- 36,40 ----
# If '/SHOWALL' is specified then a success/fail message will always be shown.
#
! # If '/SHOWNONE' is specified then no messages are displayed.
#
# Uppercase or lowercase can be used for this optional parameter.
***************
*** 73,77 ****
Caption "POPFile Silent Shutdown Utility"
! !define VERSION "0.4.1" ; see 'VIProductVersion' comment below for format details
; Specify EXE filename and icon for the 'installer'
--- 73,77 ----
Caption "POPFile Silent Shutdown Utility"
! !define VERSION "0.4.2" ; see 'VIProductVersion' comment below for format details
; Specify EXE filename and icon for the 'installer'
***************
*** 116,120 ****
!define L_TEMP $R5
! StrCpy ${L_REPORT} "none" ; default is to display no success or failure messages
; It does not matter if the command-line parameters are uppercase or lowercase
--- 116,120 ----
!define L_TEMP $R5
! StrCpy ${L_REPORT} "none" ; default is to display no success or failure messages
; It does not matter if the command-line parameters are uppercase or lowercase
***************
*** 142,146 ****
StrCmp ${L_RESULT} "/showerrors" only_errors
StrCmp ${L_RESULT} "/showall" all_cases
! StrCmp ${L_RESULT} "/none" other_param
StrCmp ${L_RESULT} "/?" usage
StrCmp ${L_RESULT} "/help" usage
--- 142,146 ----
StrCmp ${L_RESULT} "/showerrors" only_errors
StrCmp ${L_RESULT} "/showall" all_cases
! StrCmp ${L_RESULT} "/shownone" no_messages
StrCmp ${L_RESULT} "/?" usage
StrCmp ${L_RESULT} "/help" usage
***************
*** 159,163 ****
and the optional <REPORT> is /SHOWERRORS (only error messages shown), /SHOWALL\
$\r$\n\
! (success or error messages always shown), or /NONE (no messages - this is the default).\
$\r$\n$\r$\n\
A success/fail error code is always returned which can be checked in a batch file:\
--- 159,163 ----
and the optional <REPORT> is /SHOWERRORS (only error messages shown), /SHOWALL\
$\r$\n\
! (success or error messages always shown), or /SHOWNONE (no messages - this is the default).\
$\r$\n$\r$\n\
A success/fail error code is always returned which can be checked in a batch file:\
***************
*** 174,177 ****
--- 174,181 ----
Distributed under the terms of the GNU General Public License (GPL)."
Goto error_exit
+
+ no_messages:
+ StrCpy ${L_REPORT} "none"
+ Goto other_param
only_errors:
|