Skip to content

v0.4.3 — example-based sniff(), fix prepositions

Latest

Choose a tag to compare

@ChuprinaDaria ChuprinaDaria released this 08 May 13:27
· 3 commits to main since this release

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.py added to README architecture section