Installation

Small-Text can be easily installed using pip:

pip install small-text

This installs a minimal setup without any integrations.

Optional Dependencies

This library is designed to be usable in combination with as many classifiers/classification libraries as possible. Whenever possible, we try to keep most dependencies optional to avoid dependency bloat. Dependending on the classifier of your choice, you might need additional python libraries.

Note

The Pytorch and Transformers Integrations are best used with a CUDA-capable GPU. You need a CUDA version 10.1 or newer, and your GPU must also support that specific version.

Pytorch Integration

To enable the Pytorch Integration, install the library with the pytorch extra:

pip install small-text[pytorch]

Note

After installation, make sure the installed torchtext and Pytorch versions are compatible.

Transformers Integration

To enable the Transformers Integration, install the library with the transformers extra:

pip install small-text[transformers]

The Transformers Integration also requires Pytorch, so installing this automatically entails an installation of the Pytorch Integration.