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_seq - sequential retrieving dictionary items from the rulex database

Author

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

                                                February 20, 2012                                 RULEXDB_SEQ(3)

Description

       The  rulexdb_seq()  function  sequentially  fetches  lexical  records one by one. It's operations are not
       disturbed by the key-based search.

       The argument rulexdb references the rulex database.

       The arguments key and value must point to the buffers with enough space for retrieved data.

       The argument item_type specifies the dictionary dataset from which data will be retrieved. It may  accept
       one of the following values:

       RULEXDB_LEXBASE
              Extract data from the Implicit dictionary.

       RULEXDB_EXCEPTION
              Extract data from the Explicit dictionary.

       Note that the data type must be specified explicitly. The value RULEXDB_DEFAULT is not allowed here.

       When  fetching  data  from  the Explicit dictionary the correction rules will be applied. To prevent this
       feature you can specify RULEXDB_EXCEPTION_RAW instead of RULEXDB_EXCEPTION.

       The mode argument specifies direction of the dictionary scanning. Allowed
        values are: DB_FIRST, DB_NEXT, DB_PREV, or DB_LAST as defined for the underlying database library.

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.

Name

       rulexdb_seq - sequential retrieving dictionary items from the rulex database

Return Value

       The  rulexdb_seq()  function  returns  RULEXDB_SUCCESS  which  is  zero  upon  success,  positive   value
       RULEXDB_SPECIAL when no more records can be fetched, or negative error code if something is wrong.

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_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_subscribe_item(3), rulexdb_subscribe_rule(3)

Synopsis

#include<rulexdb.h>intrulexdb_search(RULEXDB*rulexdb,char*key,char*value,intitem_type,intmode);

See Also