Skip to content

Sparse Embeddings (BM25) and Persian Language Support #558

Open

Description

@alibaghernejad

Hello,
I would like to ask about the limitations of sparse embeddings, specifically BM25 when it comes to language support, and in particular Persian (Farsi).

supported_languages = [
    "arabic",
    "danish",
    "dutch",
    "english",
    "finnish",
    "french",
    "german",
    "greek",
    "hungarian",
    "italian",
    "norwegian",
    "portuguese",
    "romanian",
    "russian",
    "spanish",
    "swedish",
    "tamil",
    "turkish",
]

Are the limitations mainly related to stop word handling, tokenization, or other language-specific preprocessing steps?

If the limitation is primarily related to stop words or preprocessing, is there a recommended way to extend or customize BM25 for Persian?

I am eager to contribute and would be happy to provide the necessary data (e.g., stop word lists, etc.) to enable better Persian support.

https://github.com/qdrant/fastembed/blob/main/fastembed/sparse/bm25.py
https://huggingface.co/Qdrant/bm25/tree/main

Thanks for your guidance!

Activity

  1. Debankur04 commented on Aug 18, 2026

    @Debankur04

    Hi @alibaghernejad I am planning to check the issue and fix it if possible. It would be great if you can assign this to me. Thanks

  2. Debankur04 commented on Aug 19, 2026

    @Debankur04

    Hi! I’ve implemented a solution for this issue in PR #684: PR #684

    It adds Persian BM25 support with lightweight preprocessing, Persian stopword handling, and accompanying tests.

    Would appreciate it if you could take a look when you get a chance. Feedback is very welcome!

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