Community repository of pre-trained models for the classifier gem.
# List available models
classifier models
# Download a model
classifier pull spam-filter
# Use a model directly (downloads if needed)
classifier -r spam-filter "Is this spam?"
# Use from a different registry
classifier -r @other-user/models:sentiment "I love this!"| Name | Type | Description |
|---|---|---|
| Coming soon |
- Train your classifier:
classifier train spam spam_corpus.txt
classifier train ham ham_corpus.txt- Submit via CLI:
classifier push ./classifier.json --name "my-model" --description "Description here"Or manually:
- Fork this repository
- Add your model JSON to
models/ - Update
models.jsonwith metadata - Submit a pull request
Models are standard classifier JSON exports:
{
"type": "bayes",
"categories": ["spam", "ham"],
"...classifier data..."
}{
"my-model": {
"description": "What this model classifies",
"type": "bayes",
"categories": ["cat1", "cat2"],
"file": "models/my-model.json",
"version": "1.0.0",
"author": "github-username"
}
}Any GitHub repo with this structure works as a registry:
your-repo/
├── models/
│ └── your-model.json
└── models.json
Users can then use your models:
classifier -r @your-username/your-repo:your-model "text"
classifier pull @your-username/your-repo:your-model
classifier pull @your-username/your-repo # all models- Models should be generally useful (not project-specific)
- Include clear descriptions
- Test before submitting
- No sensitive/private training data
- Reasonable file sizes (< 10MB preferred)
Models contributed here are licensed under MIT unless otherwise specified by the author.