16 #ifndef INCLUDE_NN_NLIB_SUCCINCT_AHOCORASICKBUILDER_H_ 17 #define INCLUDE_NN_NLIB_SUCCINCT_AHOCORASICKBUILDER_H_ 24 #if defined(_MSC_VER) && defined(nx_succinct_EXPORTS) 25 #undef NLIB_VIS_PUBLIC 26 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT 44 typedef bool (*MatchCallback)(
const char* first,
const char* last, uint32_t nodeid,
46 void MatchByBuilder(
const char* doc, MatchCallback callback,
void* user_obj)
NLIB_NOEXCEPT;
47 void MatchByBuilder(
const char* doc, MatchCallback callback) NLIB_NOEXCEPT {
48 MatchByBuilder(doc, callback, NULL);
57 struct BuildFailureArcTh;
58 struct BuildReportTreeHolderTh;
59 struct BuildFailureTreeHolderTh;
60 struct BuildGotoArcHolderTh;
61 struct BuildLenHolderTh;
65 struct AhoCorasickBuilderPrivate;
66 AhoCorasickBuilderPrivate* prv_;
73 #if defined(_MSC_VER) && defined(nx_succinct_EXPORTS) 74 #undef NLIB_VIS_PUBLIC 75 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 78 #endif // INCLUDE_NN_NLIB_SUCCINCT_AHOCORASICKBUILDER_H_ #define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
Uses the Aho-Corasick algorithm to detect language and patterns.
AhoCorasickBuilder() noexcept
Instantiates the object with default parameters (default constructor).
Defines the class for searching text strings using the Aho-Corasick string-matching algorithm...
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
bool AddWords(const char *str) noexcept
Adds a string from an array containing a set of target strings. The strings must be delimited by newl...
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
Creates the index (automaton) used in the Aho-Corasick algorithm.