---
name: "rulexdb_classify"
section: "3"
platform: "linux"
package: "librulexdb-dev"
version: "3.8.6-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rulexdb_classify"
---

# rulexdb\_classify(3)

test specified word whether it represents a lexical base

## NAME

rulexdb\_classify - test specified word whether it represents a lexical base

## SYNOPSIS

```
#include <rulexdb.h>

int rulexdb_classify(RULEXDB *rulexdb, const char *s);
```

## DESCRIPTION

The **rulexdb\_classify**() function tests the word pointed by *s* argument trying to determine if it can be treated as a lexical base according to the rulex database referenced by *rulexdb* argument.

## RETURN VALUE

The **rulexdb\_classify**() function returns **RULEXDB\_SUCCESS** which is zero when the word represents no lexical base, positive value **RULEXDB\_SPECIAL** when the word can be treated as a lexical base, or negative error code if something is wrong.

## 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.

## SEE ALSO

[**rulexdb\_close**(3)](/rulexdb_close/3.md), [**rulexdb\_dataset\_name**(3)](/rulexdb_dataset_name/3.md), [**rulexdb\_discard\_dictionary**(3)](/rulexdb_discard_dictionary/3.md), [**rulexdb\_discard\_ruleset**(3)](/rulexdb_discard_ruleset/3.md), [**rulexdb\_fetch\_rule**(3)](/rulexdb_fetch_rule/3.md), [**rulexdb\_lexbase**(3)](/rulexdb_lexbase/3.md), [**rulexdb\_load\_ruleset**(3)](/rulexdb_load_ruleset/3.md), [**rulexdb\_open**(3)](/rulexdb_open/3.md), [**rulexdb\_remove\_item**(3)](/rulexdb_remove_item/3.md), [**rulexdb\_remove\_rule**(3)](/rulexdb_remove_rule/3.md), [**rulexdb\_remove\_this\_item**(3)](/rulexdb_remove_this_item/3.md), [**rulexdb\_retrieve\_item**(3)](/rulexdb_retrieve_item/3.md), [**rulexdb\_search**(3)](/rulexdb_search/3.md), [**rulexdb\_seq**(3)](/rulexdb_seq/3.md), [**rulexdb\_subscribe\_item**(3)](/rulexdb_subscribe_item/3.md), [**rulexdb\_subscribe\_rule**(3)](/rulexdb_subscribe_rule/3.md)

## AUTHOR

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