Text Similarity API
Fuzzy matching + semantic analysis for flexible text comparison
A FastAPI service that detects typos using Levenshtein distance and understands meaning through transformer-based embeddings. Built for quiz apps, form validation, and flexible answer checking.
Try It Live
Tech Stack
Python
FastAPI
Sentence Transformers
all-MiniLM-L6-v2
RapidFuzz
How It Works
- 1.Normalize: Convert both inputs to lowercase
- 2.Fuzzy Check: Calculate Levenshtein distance ratio (catches typos)
- 3.Semantic Check: Encode both as embeddings, measure cosine similarity
- 4.Verdict: Pass if either threshold is met
Use Cases
- •Quiz/trivia game answer validation
- •Form input validation with typo tolerance
- •Educational platforms for grading short answers
- •Search systems with semantic understanding