Skip to content

EWB's Classifier API

Lorena Calvo-Bartolomé edited this page Sep 12, 2023 · 5 revisions

The Classification Service is a tool designed to categorise text content based on a predefined hierarchy of language models. This service leverages the clf-inference-intelcomp library, enabling users to efficiently classify text data. Below, you'll find detailed information about the service's endpoints and how to use them effectively.

Please refer to the official documentation for a comprehensive guide on utilising the library's capabilities.

Note on Model Loading: It's worth noting that the classification process may take longer if the language models have not been loaded into the cache. To optimise performance, we recommend caching the required models in advance.

Endpoints

Endpoint Description
/classification/classify Classifies text using models trained within a specified taxonomy.
/classification/list_avail_taxonomies Retrieves a list of available taxonomies.
/classification/cache_models Caches language models in memory to expedite inference times.
/classification/list_models Lists the models associated with each taxonomy, with hierarchical indentation for clarity.
/classification/list_classes Provides a comprehensive list of possible classification outputs by mapping class codes to names.

Examples of classification (one per each available taxonomy)

  • Classification according to FOS

example_clas1

  • Classification according to IPC

example_clas2

  • Classification according to NACE2

example_clas3

Clone this wiki locally