ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::tools::nacnode Struct Reference

Aho-Corasick自动机Trie节点 More...

#include <tools_filterword.h>

Public Attributes

std::unordered_map< char, int > m_children
 字符到子节点索引的映射
int m_fail = -1
 失败链接,指向最长后缀节点
int len = 0
 在此节点结束的匹配长度;0表示"此处无终止词"
bool m_has_match = false
 当此节点或其输出链接终止了一个词时为true

Detailed Description

Aho-Corasick自动机Trie节点

用于构建敏感词匹配的自动机状态节点。 每个节点存储子节点映射、失败链接和匹配信息。


The documentation for this struct was generated from the following file: