The invention will be now described by way of illustration with reference to the accompanying drawing.
Shows the linkages used between the various tables.
Shows splitting of the table/file into multiple tables/files, each corresponding to one chapter of the Holy Quran book.
The invention is based on a hashing mechanism. The Holy Quran book has 114 chapters, with each chapter having a number of verses (1 . . . n). Each verse contains (1 . . . m) words that are made up of letters, vowel diacritics and other symbols (i.e. Fatha, Kasra . . . etc).
The first stage of the invention is about generating a hash table (i.e. a data structure) that maps each key to values accordingly. This allows an efficient lookup for a key (input verse) associated with a certain value (output verse) using the hash function. Only letters are mapped at this stage (vowel diacritics and symbols will not be used at this stage). The reason for this is again based on efficiency.
The used data structure for the hashing table is as follows:
A verse_id would point to the raw table that contains the corresponding full verse of the Holy Quran, which in turn can be associated with a linked list of size one-to-many. A special data structure was formatted and devised for this linked list, and it is as follow:
Several tables are constructed to achieve this. First, a table is constructed to map words with their containing verses. This table contains two attributes; the first stores the hash code (index) of a word, while the other stores the verse_id of the verse that contains that specific word.
Another table is constructed that stores the actual content of the verses. Each record in this table has a unique id called data_id.
A final table, the link table, is constructed to map each verse_id to the corresponding data_id. This table is used as an intermediate fetching stage connecting the first and the second tables (
In
The second stage of the invention is to devise a logic and heuristics in order to deal with symbols positions and matching the relevance of each combination. This requires a setup of additional lookup tables, which would hold the data for the symbols, along with their order for each of the words belonging to a particular verse.
Having one single file for the hash table is not ideal in this case. This is due to the fact that the file size can grow very large, as it has to cope with many combinations and orders. Larger file sizes can slow down the search. Therefore, a hash table is generated for each chapter of the Holy Qur'an (114 in total) as in
The next step was constructing a structured index file that contains information of vowel diacritics and other symbols. Once a match is found, this file will be analyzed to check the positions and validity of each symbol for that verse. Special rules/heuristics must be introduced to cope with different cases in addition to this process.
If a match cannot be found, the input text needs to be adjusted intelligently and then re-processed until it is exhausted. For example, consider the case where the input text has 3 words. The first two words were valid but the third was not. Since the last word is incorrect the matching algorithm will return a no-match. In that case, one way to re-test would be to delete the last word and process with only the first two instead.
Once a match or equivalent match is found, the corresponding result will be displayed indicating chapter/verse information together with additional information that is highlighted to the user for his attention.
The invention allows people to check the correctness of the printed verses against the authentic version of the Holy Quran. It also provides the ability to check Holy Quran's verses written in the scientific papers and in web pages. Using this mechanism we will help in protecting the Holy Quran from any distortion. This project is important because of the following:
1. The Internet became very wide and many sites are citing Quran verses. Sometimes the used verses contain some intentional or unintentional mistakes. Many of the Internet users do not notice these mistakes.
2. The increasing number of Muslims as well as the people who are joining Islam, taking into consideration that many of them does not speak Arabic.
3. The need to print and distribute many copies of Quran all over the world after revising and correcting them. This task requires time, effort and expert people in the Holy Quran.
This invented mechanism has many advantages, some of which are listed below:
1. Easy to use and does not require from the user to be an expert in the Holy Quran.
2. Saving the time that is required to revise the Holy Quran.
3. This mechanism can be utilized at Islamic centers in the non-Muslim countries to make sure that Muslim people there have correct copies of the Holy Quran.