Zero-Shot Wikidata Classifier

This model performs zero-shot text classification by dynamically integrating knowledge from Wikidata. It classifies text into custom categories without requiring training data.

How It Works

  1. Input: Receives any text input
  2. Knowledge Expansion: Queries Wikidata for related concepts
  3. Classification: Uses Wikipedia-trained BART model to match text to concepts
  4. Output: Returns ranked categories with confidence scores

Capabilities

  • 🧠 Dynamic Classification: Adapts to new categories via Wikidata
  • Zero-Shot Learning: No training required
  • 🔍 Knowledge Integration: Leverages Wikipedia's semantic relationships
  • 🌐 Multilingual Support: Works with 100+ languages (see multilingual section)

Usage

from transformers import pipeline
from wikidata import get_wikidata_labels

classifier = pipeline("zero-shot-classification", 
                      model="your-username/zero-shot-wikidata-classifier")

# Classify with Wikidata expansion
labels = get_wikidata_labels("renewable energy")
result = classifier("Perovskite solar cells achieve 30% efficiency", 
                   candidate_labels=labels)
Downloads last month
13
Safetensors
Model size
407M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train harshag11/zero-shot-wikidata-classifier