Mindket

persian-rag demo

Newversion 1 · updated

Overview

Try Persian text normalization and BM25, dense or hybrid search over 34 sample passages, all running in your browser through Pyodide. No server, no model download, no API key.

persian-rag demo is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python and pip, for the hf download command
  • A web browser
  • Any static file server, such as the one built into Python
Runs in
  • A web browser, on the Space's page at Hugging Face
  • A web browser on Windows, macOS or Linux, from a local copy served by a static file server
  • Your own Python code, through the persian-rag package
Start with
pip install -U huggingface_hub
hf download sadrmanesh/persian-rag-demo --repo-type space --local-dir persian-rag-demo
cd persian-rag-demo

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

What it is

This Space is a small browser demo of persian-rag, a Python toolkit for retrieval-augmented generation that puts Persian first. The library needs no other packages, so the demo runs it directly in your browser through Pyodide, with no server.

The demo covers two things. It searches 34 bundled Persian passages, and it normalizes Persian text. Answer generation is left out on purpose.

Who it suits

It suits people who build search or question answering for Persian text and want to try the library first, and developers who want to see Python run inside a static page.

IndustryWho uses itHow they use itExample
Natural language processingNLP engineersCompare keyword, dense and hybrid search on Persian passagesSeeing how reciprocal rank fusion changes the ranking
Search and knowledge toolsSearch developersTest spelling variant rewritingMatching variants of the same Persian word
ResearchLanguage researchersInspect which characters normalization changesChecking how Arabic and Persian letter forms are unified
EducationStudentsTry the demo with nothing to installLearning how retrieval works before adding a model

Skip it if you want a full question answering system, since the demo leaves answer generation out.

Where to use it

The demo runs in these places.

  • A web browser, on the Space's page at Hugging Face
  • A web browser on Windows, macOS or Linux, from a local copy served by a static file server
  • Your own Python code, through the persian-rag package
Use caseWhoWhat they get back
Search Persian passagesDevelopersRanked results from BM25, dense or hybrid search
Normalize Persian textResearchersCleaned text with the changed code points listed
Try spelling variantsSearch buildersMatches across alternate spellings

How to set it up

Online you only need a browser. A local copy needs these.

  • Python and pip, for the hf download command
  • A web browser
  • Any static file server, such as the one built into Python
  1. Install the huggingface_hub package.
  2. Download the Space's files into a folder with the hf command.
  3. Move into that folder.
  4. Serve the folder with a static file server.
  5. Open the served page on port 8000 in a web browser.
pip install -U huggingface_hub
hf download sadrmanesh/persian-rag-demo --repo-type space --local-dir persian-rag-demo
cd persian-rag-demo
python -m http.server

If you want the library in a project of your own, this command installs release 0.4.0.

pip install persian-rag==0.4.0

How to use it

Open the Space's page and choose a search mode, then type a Persian query. You can switch spelling variant rewriting on or off, and you can run the normalization on a piece of text to see which code points changed.

ToolWhat it does
BM25Ranks passages by how well their words match the query
DenseRanks passages by embedding similarity, though the demo's scores are not semantic
HybridCombines the two rankings with reciprocal rank fusion
Variant rewritingLets one word match under its alternate spellings, such as two common forms of the city name Tehran
NormalizationUnifies Arabic Yeh and Kaf, digits, half-spaces and punctuation

Example

You type a Persian query and choose hybrid search. The page returns the best matching passages from the 34 bundled ones, and with variant rewriting on, it also finds passages that spell a word another way.

For newcomers and experts

If you are new, open the Space's page and try the normalization first. It shows you how different keyboards can type the same Persian letter in different ways.

If you know the field, the demo embeds text with HashingEmbedder, which works offline. Its dense scores therefore carry no meaning about semantics. On a real corpus, the README points to SentenceTransformerEmbedder, whose default model from 0.4.0 is multilingual-e5-small with the E5 prefixes added automatically, or to an OpenAI-compatible embedder.

  1. Open the page and Pyodide loads
  2. Type a Persian query or text
  3. The library searches or normalizes it
  4. Results show with the changes listed

Good to know

The corpus and questions come from the persian-rag retrieval benchmark. The file demo.py holds the Python part of the demo, and a built 0.4.0 package file sits in the repository.

  • License: MIT
  • Cost to run: none named, and the demo asks for no key or model files
  • Data it reaches: the bundled passages and benchmark data in the repository
  • Not for: generating answers, since the demo leaves answer generation out

README and files

README

persian-rag demo

Try Persian text normalization and BM25, dense or hybrid search over 34 sample passages, all running in your browser through Pyodide. No server, no model download, no API key.

Made by sadrmanesh on Hugging Face. These notes are Mindket's, written from its Space page and README; the app's own files and license are on Hugging Face.

About

What it is: This Space is a small browser demo of persian-rag, a Python toolkit for retrieval-augmented generation that puts Persian first. The library needs no other packages, so the demo runs it directly in your browser through Pyodide, with no server.

The demo covers two things. It searches 34 bundled Persian passages, and it normalizes Persian text. Answer generation is left out on purpose.

Who it suits: It suits people who build search or question answering for Persian text and want to try the library first, and developers who want to see Python run inside a static page.

Industry | Who uses it | How they use it | Example
Natural language processing | NLP engineers | Compare keyword, dense and hybrid search on Persian passages | Seeing how reciprocal rank fusion changes the ranking
Search and knowledge tools | Search developers | Test spelling variant rewriting | Matching variants of the same Persian word
Research | Language researchers | Inspect which characters normalization changes | Checking how Arabic and Persian letter forms are unified
Education | Students | Try the demo with nothing to install | Learning how retrieval works before adding a model

Skip it if you want a full question answering system, since the demo leaves answer generation out.

Where to use it: The demo runs in these places.

  • A web browser, on the Space's page at Hugging Face
  • A web browser on Windows, macOS or Linux, from a local copy served by a static file server
  • Your own Python code, through the persian-rag package
Use case | Who | What they get back
Search Persian passages | Developers | Ranked results from BM25, dense or hybrid search
Normalize Persian text | Researchers | Cleaned text with the changed code points listed
Try spelling variants | Search builders | Matches across alternate spellings

How to set it up: Online you only need a browser. A local copy needs these.

  • Python and pip, for the hf download command
  • A web browser
  • Any static file server, such as the one built into Python
  1. Install the huggingface_hub package.
  2. Download the Space's files into a folder with the hf command.
  3. Move into that folder.
  4. Serve the folder with a static file server.
  5. Open the served page on port 8000 in a web browser.
pip install -U huggingface_hub
hf download sadrmanesh/persian-rag-demo --repo-type space --local-dir persian-rag-demo
cd persian-rag-demo
python -m http.server

If you want the library in a project of your own, this command installs release 0.4.0.

pip install persian-rag==0.4.0

How to use it: Open the Space's page and choose a search mode, then type a Persian query. You can switch spelling variant rewriting on or off, and you can run the normalization on a piece of text to see which code points changed.

Tool | What it does
BM25 | Ranks passages by how well their words match the query
Dense | Ranks passages by embedding similarity, though the demo's scores are not semantic
Hybrid | Combines the two rankings with reciprocal rank fusion
Variant rewriting | Lets one word match under its alternate spellings, such as two common forms of the city name Tehran
Normalization | Unifies Arabic Yeh and Kaf, digits, half-spaces and punctuation

Example: You type a Persian query and choose hybrid search. The page returns the best matching passages from the 34 bundled ones, and with variant rewriting on, it also finds passages that spell a word another way.

For newcomers and experts: If you are new, open the Space's page and try the normalization first. It shows you how different keyboards can type the same Persian letter in different ways.

If you know the field, the demo embeds text with HashingEmbedder, which works offline. Its dense scores therefore carry no meaning about semantics. On a real corpus, the README points to SentenceTransformerEmbedder, whose default model from 0.4.0 is multilingual-e5-small with the E5 prefixes added automatically, or to an OpenAI-compatible embedder.

Open the page and Pyodide loads
Type a Persian query or text
The library searches or normalizes it
Results show with the changes listed

Good to know: The corpus and questions come from the persian-rag retrieval benchmark. The file demo.py holds the Python part of the demo, and a built 0.4.0 package file sits in the repository.

  • License: MIT
  • Cost to run: none named, and the demo asks for no key or model files
  • Data it reaches: the bundled passages and benchmark data in the repository
  • Not for: generating answers, since the demo leaves answer generation out

On Hugging Face, 13 November 2026

  • Likes: 1
  • Built with: static
  • License: mit

Links

Try it

Open the Space in your browser, or copy it to your own Hugging Face account from its page. Nothing in this kit runs by itself.

Files
README.md  5 KB

1 file, 5 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Compare with similar

Listed Hugging Face Spaces in the same category that share the most tags with this one.

ProductLikesBuilt withLicenseLast change
persian-rag demo This page1staticmit
InferenceSupportShares static764staticafl-3.0
HuggyShares static463staticcc-by-nc-sa-4.0
Z-Image Lookalike LoRA IndexShares static189staticapache-2.0
Granite Docling 258M WebGPUShares static163staticapache-2.0
DINOv3 WebShares static162staticapache-2.0
Numbers as Mindket last read them, on 2026-11-12.

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar in Developer

See all in Developer

Lexnet

alpindale · Kit

Tags every character of C source code for syntax highlighting with a tiny neural network of about 984 weights, run through a small C program. For developers an…

New

FLUX.2 Klein LoRA Studio

prithivMLmods · Kit

Try a set of LoRAs for the FLUX.2 Klein image model in a Gradio app that runs in your browser or on your own computer. Made for people who make or test AI imag…

New

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New