\file GikoBayesian.pas
\brief \83x\83C\83W\83A\83\93\83t\83B\83\8b\83^
-$Id: GikoBayesian.pas,v 1.16 2004/11/01 10:32:02 yoffy Exp $
+$Id: GikoBayesian.pas,v 1.17 2004/11/05 14:24:26 h677 Exp $
}
//! \95½\89¼\96¼\82ð\8e«\8f\91\82É\8aÜ\82ß\82È\82¢
Result := 0.01
else if info.ImportantWord + info.NormalWord * 2 < 5 then
Result := 0.5
- else
- Result := ( info.ImportantWord / info.ImportantText ) /
- ((info.NormalWord * 2 / info.NormalText ) +
- (info.ImportantWord / info.ImportantText));
+ else begin
+ try
+ Result := ( info.ImportantWord / info.ImportantText ) /
+ ((info.NormalWord * 2 / info.NormalText ) +
+ (info.ImportantWord / info.ImportantText));
+ except
+ on EZeroDivide do Result := 0.99;
+ end;
+ end;
end;
var