Skip to content
Projects

pooooooriya/salsi has 91 GitHub stars and 5 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and +1 in 15 days. Last checked 2026-11-16 00:03 UTC. Last push 2026-08-13.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Write Persian with Persian words — a loanword scanner and an AI-assistant skill built on the Pasban dictionary. Ships 20,071 words, protects technical terms, code and quotations. Works in Claude, Codex, Cursor and more.

Developer Tools

README.en.md

Original
salsi

سالسی · salsi

Write more Persian. Break nothing.

بسی رنج بردم در این سال سی
عجم زنده کردم بدین پارسی
"I laboured much these thirty years; I revived the Persians with this Persian." — Ferdowsi

tests code: MIT data: ODbL

Website · فارسی · Attribution · Pasban


A skill for AI assistants (Claude, Codex, Cursor, …) and a command-line tool that finds loanwords in Persian prose and offers Persian equivalents — without touching technical terminology, proper nouns or code.

The word list is the work of Pasban, used under the ODbL licence they publish it under.

git clone https://github.com/pooooooriya/salsi && cd salsi && ./install.sh

No pip required: every skill it installs carries the engine and all 20,071 Pasban words with it. Python 3.10 is the only requirement.

$ salsi scan article.md --domain tech

  ✓ سیستم (1:18)
      → سامانه [safe]
  ✓ سرور (3:37)
      → کارساز [safe]
  ? کانفیگ (4:1)
      → پیکربندی
  ✓ دانلود کنید (4:11)
      → بارگیری کنید [safe]

It said nothing about the fenced code, the inline code, the URLs, or الگوریتم — because none of those should change.


Why this is harder than a find-and-replace

Word-for-word dictionary substitution wrecks Persian text. Real examples from this very lexicon:

In the text Naive replacement What went wrong
سرور in a systems document شادمانی ("joy") The dictionary keys on spelling; سُرور and server are written identically
کیبورد تخته‌مدنگ Correct, and unrecognisable
الگوریتم روال‌واره It is the term of art; translating it makes the text less precise
فایل‌ها → پرونده‌ها ✅ but خانه‌ای → سرایای ❌ Persian suffixes change shape with the new stem
دانلود کنید بارگیری کردن The writer's inflection has to survive, not the infinitive

So the project has three layers that catch exactly these:

1. A matcher that understands Persian — ZWNJ, Arabic letter variants, diacritics, inflectional suffixes, multi-word entries and compound verbs. فایل‌هایمان, فایل ها and فایلها all reach the same headword, and the suffix is rebuilt for the replacement (خانه + indefinite is خانه‌ای, but کتاب + indefinite is کتابی).

2. Guard layers — non-prose regions (code fences, inline code, URLs, HTML tags, LaTeX, front matter) and protected vocabulary by domain (tech, medical, legal, science, business).

3. Three explicit levels, because "more Persian" is not a single number:

Level Offers For
safe Only the 119 settled replacements Automation, CI, anything you cannot review
standard (default) Everything except naturalised and protected words Normal editing with review
pure All 20,071 headwords سره‌نویسی, only on request

Only safe ever runs without a human. The rest are suggestions, not decisions.


The skill

The real deliverable is skills/salsi/SKILL.md: judgement instructions for an AI assistant — when to replace, when not to, and why.

./install.sh            # detects what you have and asks
./install.sh --list     # just report
./install.sh claude cursor
Tool Destination
Claude Code ~/.claude/skills/salsi/ or a project's .claude/skills/
Claude.ai / Desktop upload the folder in Settings
Codex appended to AGENTS.md
Cursor .cursor/rules/salsi.mdc
Windsurf / Cline / Continue / Zed files under skills/adapters/
Anything else paste skills/adapters/PROMPT.md into the system prompt

Every install is self-contained: bin/salsi inside the skill folder, with the whole lexicon. Where an assistant cannot run commands at all, it falls back to the 119-row table in reference/core-words.md and is told to say that it is working without the full dictionary.


CLI

salsi scan article.md                   # --format text|json|markdown
salsi scan article.md --domain tech --topic "رایانه"
salsi apply article.md --diff           # settled replacements only
salsi lookup سرور                       # what Pasban offers, and in which sense
salsi domains
salsi info

As a CI or pre-commit check:

salsi scan docs/**/*.md --level safe --strict

JSON is the canonical machine format: every finding carries level, ambiguous, its exact position, and a sense label per suggestion — which is what an agent must read to avoid turning سرور into شادمانی.


Layout

salsi/          engine: normalize, morphology, lexicon, guards, scan
  data/              lexicon.json (Pasban's words) + curated.tsv + protection lists
skills/
  salsi/       the skill and its references
  adapters/          AGENTS.md, cursor rule, generic prompt
examples/            a before/after sample
scripts/             reference-table builder
tests/               32 tests
python3 -m unittest discover tests

Contributing

The most valuable contribution is not code but the word lists — CONTRIBUTING.md states the exact boundary of each.

If a word is missing or wrong in the dictionary itself, tell Pasban; that is where it comes from.

Licence

What Licence
The سالسی software MIT
salsi/data/** (a derived database of Pasban's dataset) ODbL v1.0
Text you write with سالسی a "Produced Work" — needs the Pasban attribution only

The lexicon is built from Pasban's own release:

python3 scripts/fetch_lexicon.py     # newest release

Every ODbL condition — attribute, share-alike, keep open — is met; ATTRIBUTION.md shows exactly how.