RULEXDB_LEXBASE(3)
π RULEXDB_LEXBASE(3) π
okay bestie, pull up a chair because we're about to talk about rulexdb_lexbase from the rulexdb library functions manual and honestly? she's kind of iconic. π
β¨ NAME β¨
rulexdb_lexbase β the girl whose whole job is trying to find the lexical base for a word you hand her. no cap, that's the gig. π¦
πΈ SYNOPSIS πΈ
#include <rulexdb.h>
int rulexdb_lexbase(RULEXDB *rulexdb, const char *s, char *t, int n);
likeβ¦ look at her. four arguments. serving c function energy. π
π DESCRIPTION π
so here's the tea, fr fr. The rulexdb_lexbase() function goes scanning through the Classifiers ruleset, and it starts from n β and heads up, n must be positive, that's non-negotiable, it's giving boundaries β while it tries to match the word that s points at. π«Ά
when the match actually succeeds (slay), the lexical base gets constructed in the memory area that t points at, and listen β that area must have enough space for it, like you have to actually prepare room, she is not going to build it in a closet. Then the function returns the number of the matched rule, or 0 if no match was found. π§
and the rulexdb argument? that's a reference to the rulex database we're searching in. she needs to know where to look. π
β RETURN VALUE β
- returns the number of the matched rule β and that number is always positive, okay, always π
- returns
0when no match was found - returns a negative error code if something went wrong π
π ERRORS π
RULEXDB_FAILUREβ the referenced database has not been opened, or the internal data structures are corrupted, or some other general failure has occurred. it's giving disaster. πRULEXDB_EMALLOCβ internal memory allocation error. the mallocs said no. πRULEXDB_EPARMβ invalid parameters are specified. bestie. check your args. π€
π₯ SEE ALSO π₯
rulexdb_classify(3)rulexdb_close(3)rulexdb_dataset_name(3)rulexdb_discard_dictionary(3)rulexdb_discard_ruleset(3)rulexdb_fetch_rule(3)rulexdb_load_ruleset(3)rulexdb_open(3)rulexdb_remove_item(3)rulexdb_remove_rule(3)rulexdb_remove_this_item(3)rulexdb_retrieve_item(3)rulexdb_search(3)rulexdb_seq(3)rulexdb_subscribe_item(3)rulexdb_subscribe_rule(3)
the whole friend group, honestly. go say hi. π
π AUTHOR π
Igor B. Poretsky <poretsky@mlbox.ru>. the main character who wrote her. periodt. β¨
and that's the whole page, bestie β Library Functions Manual, RULEXDB_LEXBASE(3), dated February 20, 2012, mwah π
π
π¦ where this page comes from
- debian trixie: librulexdb-dev 3.8.6-1 Β· LGPL-2.1-or-later
- ubuntu questing: librulexdb-dev 3.8.6-1
- ubuntu resolute: librulexdb-dev 3.8.6-1build1 Β· LGPL-2.1-or-later
- ubuntu stonking: librulexdb-dev 3.8.6-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms