+ if GikoSys.Setting.SpamFilterAlgorithm = gsfaNone then Exit;
+ j := 0;
+ wordCount := TWordCount.Create;
+ try
+ if (FAbonRes.FLearned = 0) and (FAbonRes.Count = 0) then begin
+ // \8f\89\82ß\82Ä\82Ì\8aw\8fK\82©\82Â\8cÂ\95Ê\82 \82Ú\81`\82ñ\82 \82è\82È\82Ì\82Å\81A\8b\8cver\82©\82ç\82Ì\88Ú\8ds\82É\82Â\82«
+ // \8cÂ\95Ê\82 \82Ú\81`\82ñ\82ð\8eg\82Á\82½\8aw\8fK
+ FAbonRes.Sort;
+ for i := 0 to FAbonRes.Count - 1 do begin
+ while (j < resList.Count) and (j + 1 < FAbonRes[ j ].Res) do begin
+ wordCount.Clear;
+ GikoSys.Bayesian.CountWord( resList[ j ], wordCount );
+ GikoSys.Bayesian.Learn( wordCount, False );
+ Inc( j );
+ end;
+ if j < resList.Count then begin
+ wordCount.Clear;
+ GikoSys.Bayesian.CountWord( resList[ j ], wordCount );
+ GikoSys.Bayesian.Learn( wordCount, True );
+ Inc( j );
+ end;
+ end;
+
+ while j < resList.Count do begin
+ wordCount.Clear;
+ GikoSys.Bayesian.CountWord( resList[ j ], wordCount );
+ GikoSys.Bayesian.Learn( wordCount, False );
+ Inc( j );
+ end;
+ end else begin
+ // \8b\8cver\82©\82ç\82Ì\88Ú\8ds\82Å\82Í\82È\82¢\82Ì\82Å\83\8c\83X\82ð\91S\82Ä\90\84\98_\82Å\8aw\8fK
+ // \81¦\90\84\98_\82ª\8aÔ\88á\82Á\82Ä\82¢\82é\8fê\8d\87\82Í\83\86\81[\83U\82ª\82 \82Ú\81`\82ñ\82ð\8fC\90³\82·\82é\8e\96\82Å\8aw\8fK\82³\82ê\82é
+ for j := FAbonRes.FLearned to resList.Count - 1 do begin
+ wordCount.Clear;
+ spamminess := GikoSys.SpamParse( resList[ j ], wordCount );
+ if spamminess >= SPAM_THRESHOLD then begin
+ // \83X\83p\83\80
+ GikoSys.Bayesian.Learn( wordCount, True );
+ indiviAbon := TIndiviAbon.Create;
+ indiviAbon.Res := j + 1;
+ indiviAbon.Option := 1;
+ FAbonRes.Add( indiviAbon );
+ end else begin
+ // \83n\83\80
+ GikoSys.Bayesian.Learn( wordCount, False );
+ end;
+ end;
+ end;
+
+ FAbonRes.FLearned := resList.Count;
+ FAbonRes.Save;
+ finally
+ wordCount.Free;
+ end;
+
+ FAbonRes.Save;
+ GikoSys.Bayesian.Save;
+
+end;
+{$ENDIF}
+
+//\95¡\90\94\82ÌNG\83\8f\81[\83h\83e\83L\83X\83g\82ð\93Ç\82Ý\8d\9e\82Þ=====\82±\82±\82Ü\82Å=================================
+//\8cÂ\95Ê\82 \82Ú\81`\82ñ\8eÀ\8ds\8aÖ\90\94
+procedure TAbon.IndividualAbon(var ThreadStrings : TStringList; SetResNumFile : String);
+var
+ i : Integer;
+ f : Boolean;
+begin
+ f := LoadFromSetResNumFile( SetResNumFile );
+ FAbonRes.FFilePath := SetResNumFile; // Learn \82Í\82Å\95Û\91¶\82·\82é\82Ì\82Å
+{$IFDEF SPAM_FILTER_ENABLED}
+ Learn( ThreadStrings );
+{$ENDIF}
+
+ if f then begin
+ for i := 0 to FAbonRes.Count - 1 do begin
+ if (FAbonRes[i].Res <= ThreadStrings.Count) and (FAbonRes[i].Res > 0) then begin
+{$IFDEF NO_ABON}
+ ThreadStrings.Strings[FAbonRes[i].Res-1] :=
+ '<font color="red">\82 \82Ú\81`\82ñ\8dÏ\82Ý</font>' +
+ ThreadStrings.Strings[FAbonRes[i].Res-1];
+{$ELSE}
+ if FAbonRes[i].option = 0 then begin
+ ThreadStrings.Strings[FAbonRes[i].Res-1] := '';
+ end else begin
+ ThreadStrings.Strings[FAbonRes[i].Res-1] := '\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>';
+ end;
+{$ENDIF}
+ end;
+ end;
+ end;
+end;
+procedure TAbon.IndividualAbon(var ResString : String; SetResNumFile : String; ResNumber : Integer);
+var
+ i : Integer;
+begin
+ if FileExists(SetResNumFile) = true then begin
+ if LoadFromSetResNumFile(SetResNumFile) = true then begin
+ for i := 0 to FAbonRes.Count - 1 do begin
+ if FAbonRes[i].Res = ResNumber then begin
+ if FAbonRes[i].option = 0 then begin
+ ResString := '';
+ end else begin
+ ResString := '\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>';