What's new
sniff() — example-based classification (2/15 → 12/15)
sniff() now accepts a dict with examples per category instead of just category names:
from dormouse import sniff
results = sniff(
["Борщ український", "Чізкейк Нью-Йорк"],
{
"Гарячі страви": "борщ суп юшка харчо крем-суп",
"Десерти": "торт чізкейк еклер фондан мус",
"Напої": "сік морс лимонад компот узвар",
}
)Uses mean-of-similarities strategy with MiniLM-L12-v2 embeddings. No API calls needed.
Fix prepositions in mapper
та→and(was incorrectly mapped to"that")з/із→with(was"from", now correct for ingredient context)
Both COMPRESSED_MAP and lexicon.db updated.
Other
- 11 new tests for
sniff()(262 total, all passing) classifier.pyadded to README architecture section