Skip to main content
Aurelio AI home page
Search...
⌘K
Support
Get Started
Get Started
Search...
Navigation
encoders
semantic_router.encoders.tfidf
Semantic Router
Aurelio SDK
GraphAI
Get Started
Introduction
Quickstart
User Guide
Changelog
Components
Concepts
Features
Guides
Integrations
Aurelio
Bedrock
Cohere
Integrations
Jina
Litellm
Local
Mistral
Nvidia
Ollama
Openai
Pinecone
Postgres
Pydantic ai
Qdrant
Voyage
Client Reference
linear
route
schema
tokenizers
encoders
aurelio
azure_openai
base
bedrock
bm25
clip
cohere
fastembed
google
huggingface
jina
litellm
local
mistral
nvidia_nim
ollama
openai
tfidf
vit
voyage
index
llms
routers
utils
On this page
TfidfEncoder Objects
fit
encoders
semantic_router.encoders.tfidf
Copy page
Copy page
TfidfEncoder Objects
Copy
Ask AI
class
TfidfEncoder
(
SparseEncoder
,
FittableMixin
)
fit
Copy
Ask AI
def
fit
(
routes
: List[Route])
Trains the encoder weights on the provided routes.
Arguments
:
routes
(
List[Route]
): List of routes to train the encoder on.
openai
vit
⌘I