3 #ifndef INCLUDE_NN_NLIB_SUCCINCT_AHOCORASICKBUILDER_H_ 4 #define INCLUDE_NN_NLIB_SUCCINCT_AHOCORASICKBUILDER_H_ 11 #if defined(_MSC_VER) && defined(nx_succinct_EXPORTS) 12 #undef NLIB_VIS_PUBLIC 13 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT 31 typedef bool (*MatchCallback)(
const char* first,
const char* last, uint32_t nodeid,
33 void MatchByBuilder(
const char* doc, MatchCallback callback,
void* user_obj)
NLIB_NOEXCEPT;
34 void MatchByBuilder(
const char* doc, MatchCallback callback) NLIB_NOEXCEPT {
35 MatchByBuilder(doc, callback, NULL);
44 struct BuildFailureArcTh;
45 struct BuildReportTreeHolderTh;
46 struct BuildFailureTreeHolderTh;
47 struct BuildGotoArcHolderTh;
48 struct BuildLenHolderTh;
52 struct AhoCorasickBuilderPrivate;
53 AhoCorasickBuilderPrivate* prv_;
60 #if defined(_MSC_VER) && defined(nx_succinct_EXPORTS) 61 #undef NLIB_VIS_PUBLIC 62 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 65 #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.