Negar is a spell corrector for persian language.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alireza Savand 27f68fbf70 Fixed typo in protocol 6 years ago
docs Lowercase filename, Issue #6 + some modification in project hierarchy 6 years ago
negar Removed, cli ! 6 years ago
tests new readme 7 years ago
.gitignore IDE project configuration dir holder will be ignored now 6 years ago
AUTHORS Added AUTHORS 6 years ago
CHANGES.txt updated changes 6 years ago
LICENSE New structure V 0.2 7 years ago Added AUTHORS 6 years ago Fixed typo in protocol 6 years ago Updated 6 years ago


Negar is a spell corrector for Persian language. I’m working on new algorithm that I found from here:

Thank you Aziz.

Screenshot & Features

You can run gui version like this:

negar --gui




python-negar is available on PyPi: ::

$ pip install python-negar


You can get latest stable changes from github server: ::

$ git clone
$ cd python-negar
$ python install

Zip, Tarball

You can grab the latest tarball.


Get the latest tarball & install ::

$ wget
$ tar xvzf python-negar-master.tar.gz && cd python-negar-master
$ python install


Download latest zip archive.

Decompress it, and run the following command in root directory of python-negar ::

$ python install

For now there is no requirements except Python’s standard library.


Usage without extra args: ::

from negar.virastar import PersianEditor

text = unicode("مانند 'همه ی ' که با 'ی' پسوند همراه هستند", encoding='utf-8')
print(PersianEditor(text)) # Done ;)

Enabling extra features/args: ::

print(PersianEditor(text, *args))

Full list of args with description: ::

--fix-dashes                 Disable fix dashes feature
--fix-three-dots             Disable fix three dots feature
--fix-english-quotes         Disable fix english quotes feature
--fix-hamzeh                 Disable fix hamzeh feature
--hamzeh-with-yeh            Use 'Hamzeh' instead of 'yeh' for fix hamzeh feature
--fix-spacing-bq             Disable fix spacing braces and qoutes feature
--fix-arabic-num             Disable fix arabic num feature
--fix-english-num            Disable fix english num feature
--fix-non-persian-chars      Disable fix misc non persian chars feature
--fix-p-spacing              Disable fix perfix spacing feature
--fix-p-separate             Disable fix perfix separating feature
--fix-s-spacing              Disable fix suffix spacing feature
--fix-s-separate             Disable fix suffix separating feature
--aggresive                  Disable aggresive feature
--cleanup-kashidas           Disable cleanup kashidas feature
--cleanup-ex-marks           Disable cleanup extra marks feature
--cleanup-spacing            Disable cleanup spacing feature