Why not use database like SQLlite or others instead using txt files?

May 31, 2014 at 3:23 PM
Edited May 31, 2014 at 3:36 PM
As-salam alaikum.
First and foremost, an excellent software for Quranic Studies. I really cant assess the benefit of this effort to the entire ummah. May Allah bless the creator and supporters of this project.

I want to know the advantages of using txt files over DBs for data search.
What is quran-waw-words.txt file meant for?
How to decipher words-parts.txt?
I am DB developer by profession and i want to create something beneficial as I learned Quranic Arabic side by side.
Jun 1, 2014 at 11:23 PM
Salam brother and thank you for the kind words, may Allah bless us all with guidance to His Straight Path in sha Allah.

In order to keep the software easy to use (a single zip file runnable from USB) I decided not to use any database management system nor any installation setup. This also helps other developers to easily get the data in UTF-8 with all source code in C# if they wish to modify the program as they wish.

The data is Read-only and a database can speed up queries but the bottleneck is in the display of results in the very slow RichTextBox. If anyone wishes to improve QuranCode, then they need to talk to the RichTextBox using RTF (rich text format) or not use .NET at all and instead use the open source Qt (a truly cross-platform native C++ development environment for desktop and mobiles) from http://qt-project.com.

If you have other ideas, please share them here for all to benefit,

Thank you once again and al-hamdu liAllah for everything ALWAYS.

Jun 2, 2014 at 8:08 AM
Thanks for the prompt reply.

I wish to write a cross platform app. The primary focus would be on grammar. Alhamdulila recently, I have learned elementary Arabic through videos of Dr. Ibrahim Surety, but i had some issues in that learning curve. This App will try to teach Elementary Quranic Arabic and will try to handle those issues. I want this app to do grammatical breakdown(exploration) of very ayah ..

Roots and Verb form with all conjugation
Nouns & Pronouns,
Genitive, Accusative and Nominative Particles
Jessive , Subjunctive, prohibitive modes.

I would really like to have Verb Conjugation feature on Quran Code. Can u help on this with txt file or database if you have?

Jun 2, 2014 at 12:05 PM
Edited Jun 2, 2014 at 12:06 PM
Welcome brother and I must admit I didn't know what Verb Conjugation is so I looked it at http://en.wikipedia.org/wiki/Grammatical_conjugation.

You may need to speak with brother Asim as what you want to do seem to overlap with his work (if I understand correctly).
(Slave of ALLAH, Asim Iqbal 2nd, http://asimiqbal2nd.wordpress.com, Research, Spread and Establish Islam!).

Did you try to start QuranCode in Grammar Edition mode by holding the CTRL key at startup?
QuranCode uses a modified word-part grammar of the http://corpus.quran.com v0.4 and it is included as a text file and the DataAccess project shows to how read it into the QuranCode object model.

You may also like to use the Root->Words database compiled by the wonderful brothers of http://noorsoft.org which I modified to work with word addresses in Uthmani text (not Emlaaei text as the original I got from the Zekr.org project). It is also included in QuranCode as a *.txt file.

Let me (and everyone reading this) know if any of the above is useful or give me precise example so someone may help us both in sha Allah.

Jun 3, 2014 at 2:39 PM
Edited Jun 3, 2014 at 2:42 PM
If you look at these groups of words in English, you can see they have different but connected meanings:

By adding different endings and prefixes, the meaning is slightly changed. For example, as a native speaker you recognize that the prefix “re-” means “to do something again.” Arabic takes this principle much further with many different patterns that add meaning to the original root form. These derived forms are the major way in which Arabic achieves its richness of vocabulary.
The key to understanding how Arabic grammar works is in its system of tri-lettered roots. Once you understand how roots work, you can start to identify which are the root letters of a word and understand the patterns they produce. There are 15 derived forms in Arabic. Out of which 10 are sufficient enough to comprehend Quran Arabic. I guess this is not the platform to go in detail. Please refer to this link for detail understanding

Each root(كَتَبَ ) can take on or more derived form. كَتَبَ (to write) is root which takes derived form I,II, III & VIIIكَاتِبُ . Its simply means there can be more than 20 words, which can be derived from كَتَبَ, giving subtle but significance difference in meaning.
كَتَبَ as Form I
كَاتِبُ as Form II
ٱكْتَتَبَ as Form VIII
Now, all of the above 3 derived forms, will be have at-least 4-5 conjugation such as

Form : I
Perfect : كَتَب
Imperfect : يَكْتَبُ
Verb Noun : كِتَبٌ
Active Participle : كَتِبٌ
Passive Participle : مَكْتُبٌ

Form : III
Perfect : كَاتَبَ
Imperfect : يُكاَتِبُ
Verb Noun : كِتاَبٌ
Active Participle : مُكَتِبٌ
Passive Participle : مُكَتَبٌ

Similarly VIII Form will have different conjugations.
All the derived conjugation are very scientific, in the way they are formed. I want Quran Code to have an right click event on every ayah. Currently it shows the verb meaning on hover event. If implemented right click event will tell which form is currently verb is in, and inaddition it will show all other forms that can be derived from this root. This feature will make every student to learn as quickly as possible.

This http://www.verbix.com/webverbix/Arabic/kataba.html site has done some effort, but i found some mistakes, and the way its arranged its not very intuitive.
Jun 3, 2014 at 3:20 PM
Excellent idea brother and achievable too in sha Allah.

Can you please start QuranCode with CTRL key for the Grammar Edition and check the ActiveWords checkbox at top-right corner of the main Text area.

Then hover the mouse over the word أَنْعَمْتَ
Verb Perfect 4th Form 2nd Person Masculine Singular

with all related words used in the Quran.

If I understand you correctly you'd like to see a list of all possible verb derivatives regardless of usage in the Quran or not.
If this is what you're suggesting, then please give me the rules and in sha Allah I will add it to all words not just verbs (using reverse lookup from nouns back to verbs and then showing all derivatives).

Is this what you prefer to the existing Quran-only related words?

Jun 4, 2014 at 1:15 AM
Edited Jun 4, 2014 at 7:31 AM
Yes, Brother I would like to have all the derived forms a verb can take. Thanks for the reminding about the grammar edition. But Currently, its very difficult to comprehend with small font. I guess you are using Tool tip for displaying the grammar. And it does not shows verb form for all the verbs like Aalima, hada and more.
  1. It would be better to have a independent Text field or a something to display Verb Forms. It should display the current verb form of the selected verb.
  2. It should fetch all the derived form and its conjugation, grouped and organized intuitively . Preferably a table(right to left) like
Verbal Noun  Passive Participle Active Participle   Imperfect   Perfect   Form       
            كَتَبَ           يَكْتَبُ                  كَتِبٌ                مَكْتُبٌ      I        
All the above conjugation have a pattern, which I will give you soon Insha Allah. The Verbal Noun is something that we have to work it out later as it as it does not follow one particular pattern.

If this is done, then are further enhancement too, which will be easily achievable.
Jun 4, 2014 at 10:15 AM
Perfect Plan :)

I always wanted to replace that ToolTip just so the user can copy the content and al-hamdu liAllah with your requirement, now I have to change it to a TextBox with TAB-delimited fields so it can be easily copied and pasted into Excel if needed.

As for the grammar database, I have taken that from corpus.quran.com and the project seems dead there for few years now.
I won't be able to complete its missing data as that requires specialists BUT in sha Allah I can use the conjugation rules to first inspect the form of a word under the mouse (even if not verb but derived from a verb) and then bring up all conjugations of that verb.

I expect to use a TabControl for all Translation + HTML Tafseer (currently being developed) + Derivatives

This way no need for ToolTip which annoys the user as it covers the text as they move around.

In sha Allah Khair,
Jun 5, 2014 at 6:58 AM
Here is the Pattern for Verb Conjugation. If this is achievable, which i feel so. Then, we can have complete grammatical Analysis of Quranic Ayaats.

Ayub Khan

Jun 5, 2014 at 9:19 AM
You forgot to give a link or attached the Pattern for Verb Conjugation, or I cannot see :)
By the way the best way to understand the REAL meaning of a word and then a verse is by seeing how Allah (swt) uses it (or related words from the same root) in other verses. Oneday in sha Allah I will make a new translation to suit our times and recommend that it is updated every 10-20 years max.

Take for example 4:1 where Allah swt is telling the human race that He created it from a single soul (Adam pbuh) and then in 2:21 Allah swt is commanding us to worship Him Who created us and THOSE BEFORE US!!! so we may become God-aware and not cross any lines He set for us.

بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ يَٰٓأَيُّهَا ٱلنَّاسُ ٱتَّقُوا۟ رَبَّكُمُ ٱلَّذِى خَلَقَكُم مِّن نَّفْسٍۢ وَٰحِدَةٍۢ وَخَلَقَ مِنْهَا زَوْجَهَا وَبَثَّ مِنْهُمَا رِجَالًۭا كَثِيرًۭا وَنِسَآءًۭ ۚ وَٱتَّقُوا۟ ٱللَّهَ ٱلَّذِى تَسَآءَلُونَ بِهِۦ وَٱلْأَرْحَامَ ۚ إِنَّ ٱللَّهَ كَانَ عَلَيْكُمْ رَقِيبًۭا
يَٰٓأَيُّهَا ٱلنَّاسُ ٱعْبُدُوا۟ رَبَّكُمُ ٱلَّذِى خَلَقَكُمْ وَٱلَّذِينَ مِن قَبْلِكُمْ لَعَلَّكُمْ تَتَّقُونَ
004:001 In the Name of Allah, the All-beneficent, the All-merciful. O mankind! Be wary of your Lord who created you from a single soul, and created its mate from it, and from the two of them scattered numerous men and women. Be wary of Allah, in whose Name you adjure one another and [of severing ties with] blood relations. Indeed Allah is watchful over you.
002:021 O mankind! Worship your Lord, who created you and those who were before you, so that you may be Godwary

And many many more cross-verse(s) meaning that can only be inferred from the Related Words feature of QuranCode, al-hamdu liAllah.
This feature is actived by CTRL+Clicking a word and then QuranCode would do a reverse-root search which means take the word, lookup its root in the Root database and then bring out all words attached to the Root and display them in their verses throughout the Quran.

Allah knows better.
Jun 5, 2014 at 9:54 AM
I attached the Doc file. Anyways I am sharing through google drive. Yes, most challenging task would be to comprehend meaning of those Verbs. Lets first see, if we can generate it or not. here is the link

Jun 5, 2014 at 9:59 AM
Please dont use the Google App to view. Formatting is lost .So, Download the Doc file and use it
Jun 5, 2014 at 10:41 AM
Edited Jun 5, 2014 at 10:46 AM
Thank you brother, I've downloaded the doc file and all format is intact.
Just to let you know that the QuranCode grammar (taken from corpus.quran.com) already has these Verb Forms.
In sha Allah, what I will do is derive all forms (even the ones which don't make sense) on the fly and show them to the user for better understanding of the verb.
Is this what is required?
And it is limited to verbs only?
Jun 5, 2014 at 1:38 PM
Edited Jun 5, 2014 at 1:50 PM
Yes corpus.quran.com does a great Job. But I feel, it would be great if we can generate Verbs in an Organized form, just like the above doc file. Once all the Conjugations are derived , we can highlights all the verbs, which have been used in the Qur'an.
And it is limited to verbs only?
Lets do it for the all the words, which have a trilateral root.

Once this is done, then we can generate one more group of verbs, on the basis of Personal pronouns.
Jun 5, 2014 at 2:12 PM
In sha Allah.

For now, I am working on adding tafseer page to QuranCode to display html file for each verse.
Once that is done, I will in sha Allah start on the auto-generation of Verb Forms for trilatral rooted verbs.
Jun 11, 2014 at 7:57 PM
Salam brother,
Al-hamdu liAllah I have mapped all 3-letter rooted word to their 10 verb forms as per the table you've provided in QuranCode v4.8.3.

I have also found this beautiful tool at http://acon.baykal.be which QuranCode should emulate but for lack of screen space.

Please let me know if this is good enough as it is.

Jun 14, 2014 at 9:21 AM
Walaikum Salam Brother,
Apologies for this delayed reply.

That link is good but there has been an input involved, and that also conjugate for a single Form. What I would like to see in Qur'an Code is to fetch all the forms, a root taken in the Glorious Qur'an. Suppose root has taken only 4 forms, then the table should shows 4 forms, and conjugate it. It should highlight the pattern as given in doc file. Inaddtion, there should be an emmed link(for form) to an online documentation as to how to how its formed. Last thing would be highlight those conguated verbs, which has been used in Qur'an.
If you want I can develop quick UI design for this.


Jun 14, 2014 at 2:12 PM
Salam brother,
Let me see if I understand you:
  1. For all 3-letter rooted words (in the Quran),
    form all possible verb forms for their 3-letter root (past tense verb (normally)),
  2. For each verb form (and its 5 sub_forms (10 * 5 = 50 sub_forma)),
    search the Quran text for an EXACT (including diacritics/harakaat) match and if found, display it in its cell.
  3. Make the filled cell (those which have sub_forms used in the Quran) hyperlinked to the verses it is used in.
    (or some online global link to a verb forms tutorials.)
Please design a UI and I will in sha Allah make a separate application for it to avoid cluttering QuranCode GUI and also to display them in large Quranic font for easy reading.

Let me know if I went wrong in my understanding above.


Jun 15, 2014 at 9:31 AM
Edited Jun 15, 2014 at 10:07 AM
Walaikum Salam ,
"For each verb form (and its 5 sub_forms (10 * 5 = 50 sub_forma))" . For this we need to consult dictionary for every root, because all root don't take all the forms, but some root do take. For time being you can do for all the roots, but as enhancement in future, we may have to limit it as to whether it takes all the forms or not. A separate Application would be great. Insha Allah I will design a UI very soon. Meanwhile brother you can proceed with all the above 3 points which you have stated.

Jun 25, 2014 at 10:31 PM
Salam brother,
I have replaced the Verb Forms with Word Grammar in QuranCode v4.9.6 to give direct info including Verb Form of the "Clicked" word.