logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rulexdb_fetch_rule - extract specified rule from the rulex database

Author

       Igor B. Poretsky <poretsky@mlbox.ru>.

                                                February 19, 2012                          RULEXDB_FETCH_RULE(3)

Description

       The  rulexdb_fetch_rule()  function  retrieves  a rule identified by its type and position in the ruleset
       from the rulex database referenced by rulexdb argument.

       The argument rule_type specifies the rule type. It may accept one of the following values:

       RULEXDB_LEXCLASS
              The rule is the word classifier and belongs to the Classifiers dataset.

       RULEXDB_PREFIX
              The rule describes prefix detection and replacement and belongs to the
               Prefixdetectors ruleset.

       RULEXDB_RULE
              The requested rule should be extracted from the General rules dataset.

       RULEXDB_CORRECTOR
              The rule is a correction rule that belongs to the Correctors dataset.

       The argument position defines position of the requested rule in the ruleset.

Name

       rulexdb_fetch_rule - extract specified rule from the rulex database

Return Value

       Upon success, the rulexdb_fetch_rule() function returns pointer to  the  textual  representation  of  the
       extracted  rule.  This  pointer  remains  valid  until  the  next  database operation. Otherwise, NULL is
       returned.

See Also

rulexdb_classify(3),    rulexdb_close(3),     rulexdb_dataset_name(3),     rulexdb_discard_dictionary(3),
       rulexdb_discard_ruleset(3),       rulexdb_lexbase(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)

Synopsis

#include<rulexdb.h>char*rulexdb_fetch_rule(RULEXDB*rulexdb,intrule_type,intposition);

See Also