rulexdb_lexbase3
Try to find lexical base for the specified word
Usage
#include <rulexdb.h> int rulexdb_lexbase(RULEXDB *rulexdb, const char *s, char *t, int n);
Overview
The rulexdb_lexbase() function scans Classifiers ruleset starting from n which must be positive trying to match the word pointed by s. When match succeeds, the lexical base is constructed in memory area
pointed by t, which must have enough space for it, and the number of matched rule or 0 if no match found is returned.
The argument rulexdb references the rulex database to search in.
Return value
The rulexdb_lexbase() function returns the number of matched rule that is always positive, 0 when no match found, or negative error code.
Errors
RULEXDB_FAILURE-
Referenced database has not been opened, internal data structures are corrupted or some other general failure has occurred.
RULEXDB_EMALLOC-
Internal memory allocation error.
RULEXDB_EPARM-
Invalid parameters are specified.