[Feature]: Support pluggable stemmer for BM25 (enable Polish and other non‑Snowball languages)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.2k
- Forks
- 248
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 4
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Bm25 entry point and trace how SnowballStemmer, supported_languages, and stopword file downloads are handled. Check the proposed callable or .stem_word interface and inline stopwords behavior. Done means custom stemmers work for languages outside the supported list and inline stopwords avoid a download, with coverage for these cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100