瀏覽代碼

git-svn-id: https://svn.microneil.com/svn/SNFMulti/trunk@63 dc71a809-1921-45c4-985c-09c81d0142d9

wx
madscientist 9 年之前
父節點
當前提交
9081edfe1f
共有 1 個文件被更改,包括 14 次插入3 次删除
  1. 14
    3
      SNFMulti.cpp

+ 14
- 3
SNFMulti.cpp 查看文件

@@ -25,7 +25,7 @@ using namespace std;

//// Version Info

const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.1.3 Build: " __DATE__ " " __TIME__;
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.1.4 Build: " __DATE__ " " __TIME__;

//// Script Caller Methods

@@ -1692,8 +1692,19 @@ int snf_EngineHandler::scanMessage(
while(NULL!=ResultCursor) { // While we have records to process...
captureMatchRecord(TmpSNFMatch, ResultCursor); // grab the next record and evaluate it.
bool isPanickedRule = MyCFGPacket.isRulePanic(TmpSNFMatch.ruleid);
bool isVotingCandidate = (false == isPanickedRule);
// Mitigate short-match rulebase events to prevent false positives.
const size_t minimumPatternLength = 5; // Establish a minimum match length.
size_t matchSpan = (TmpSNFMatch.endex - TmpSNFMatch.index); // Determine the length of this match.
bool isShortMatchEvent = (minimumPatternLength > matchSpan); // Identify short-match events.
bool isPanickedRule = ( // In addition to rule IDs that are
MyCFGPacket.isRulePanic(TmpSNFMatch.ruleid) || // in the rule-panic list also treat
isShortMatchEvent // short match events as panic rules.
);
bool isVotingCandidate = (false == isPanickedRule); // Panic rules can't vote.
bool isWhiteRule = (
MyCFGPacket.Config()->TrainingWhiteRuleHandler.isListed(TmpSNFMatch.ruleid) ||
0 == TmpSNFMatch.symbol

Loading…
取消
儲存