List all models

How can I list all installed models? I want to know which models I can use for text classification.

I hope I undderstand your question correctly! If you're using spaCy, you can run python -m spacy validate to see all available models in the environment (and whether they're up to date).

For a list of all available pre-trained statistical models, see this page:

Even if spaCy doesn't ship with a pre-trained statistical model, you can still export a blank model for one of the available languages and add a text classification component to it. To export a blank model, you can run the following:

import spacy

nlp = spacy.blank('ar')  # for example, a blank Arabic model

Or, as a handy one-liner:

python -c "import spacy; spacy.blank('ar').to_disk('/path/to/model')"

In Prodigy, you can then use /path/to/model as the model you load into the recipe and collect annotations.

To use a different library and/or model implementation, you can also write a custom recipe so you can annotate with a model in the loop. Here's a code example that shows how this could look for text classification.

Perfect. That worked! thanks!

1 Like