Skip to content
Persian Spell Checking Dictionary
Python HTML Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Update for versuon 3.2 Apr 3, 2019
test Update test script Aug 6, 2017
.gitignore Update for versuon 3.2 Apr 3, 2019
LICENSE building chrome dictionay file (bdic) Dec 13, 2015
Makefile Update for versuon 3.2 Apr 3, 2019 Update for versuon 3.2 Apr 3, 2019
icon.png Update for versuon 3.2 Apr 3, 2019

Lilak, Persian Spell Checking Dictionary Build Status

Lilak is an open source project for generating Persian dictionary for hunspell spell checker based on Persian Morphology.

In Persian language affixes can change the meaning of the word. Some suffixes attached to a word as short form of verbs. Part-of-speech plays an important role in Persian language. In some cases the pronunciation of the word can change the suffixes. Check the code for more information.

Lilak has a lexicon of Persian words with part-of-speech tags. Lilak builds a dictionary for hunspell to predict the best form of compound words based on morphological rules.


  |-- build           : Build folder. Compiled dictionary goes here.
  |-- src
  |   |-- data
  |   |   |-- lexicon       : Lexicon of Persian words with part-of-speech tags
  |   |   |-- affixes       : Affix (prefix or suffix) rules
  |   |   |-- dic_users     : List of words without POS tag.
  |   |   \-- verbs.htm     : List of Persian verbs (unstemmed)
  |   |
  |   |--    : Python script for building lilak dictionary
  |   \--     : Python script to test lilak accuracy
  |-- test
  |   |-- text1       : "Farsi(Persian) is Sugar", A short story by Mohammad-Ali Jamalzadeh
  |   |-- text2       : "A Hekayat" By Saadi
  |   |-- text3       : "A Ghazal" By Hafez
  |   |-- text4       : "Yazdgerd Kingdom" By Ferdowsi
  |   |-- text5       : "A Ghazal" By Muhammad Husayn Tabataba'i
  |   |-- text6       : "Have a Safe Trip" A poem by Shafii Kadkani
  |   |-- text7       : "Se Tar" A short story by Jalal Al-e-Ahmad
  |   |-- text8       : "End of Shahname" By Mehdi Akhavan-Sales
  |   |-- text9       : "The Water"s Footsteps" By Sohrab Sepehri
  |   |-- text10      : "Nei Name" By Rumi
  |   \-- verbs       : Some inflected verbs
  |--       :
  \-- LICENCE         : License file

Building Dictionary

Before using lilak please make sure you have install python 3.x.

To build the lilak dictionary, run from src folder:

make build
make test

You can find the compiled dictionary at the build folder.

check result.log for test result.

How to contribute

The best way you can contribute on this project is collecting words with correct part-of-speech tags. Part-of-speech is important to build lilak. It should classified in main types like: verb, noun, adjective, etc. Also some other tags will be useful. like tense of verb, singular or plural, etc. Check the src/data/Lexicon for more information

Please open an issue if you find any mistakes while using lilak.

Using Lilak

  • You can find compiled dictionaries here.
  • Mozilla Firefox: Install lilak extension from here here.
  • Google Chrome: Go to Settings, find Language and input settings, add Persian language and make sure you have enabled the spell checker option.

About the Name

lilac in English came from French lilac "shrub of genus Syringa with mauve flowers" from Spanish lilac, from Arabic lilak, from Persian lilak, variant of nilak "bluish"

In Memory of Abolhassan Najafi

Abolhassan Najafi was an associate member of Iran's Academy of Persian Language and Literature. His most famous books is "Ghalat Nanevisim" (Let’s not write incorrect).


Special thanks to

You can’t perform that action at this time.