Skip to content

[Feature]: Support pluggable stemmer for BM25 (enable Polish and other non‑Snowball languages) #654

Description

@pjastrzebskiwelyo

What feature would you like to request?

Motivation: SnowballStemmer from py_rust_stemmers has no Polish algorithm, so Bm25(language="polish") is impossible even though Polish is a common target language for Qdrant users. Same applies to Czech, Ukrainian, Slovak, Bulgarian, Vietnamese…

Proposal: allow Bm25(stemmer=<callable/obj with .stem_word>, stopwords=[...], language="polish"). Skip supported_languages check when a custom stemmer is provided. Skip stopwords file download when stopwords are provided inline.

Alternative: ship a PolishStemmer wrapping pystempel behind an extra: pip install fastembed[polish].

Is there any additional information you would like to provide?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions