oazabir / Quran

Quran Research Tool
77 stars 46 forks source link

Implement Relevant verses #1

Open mirshaibal opened 11 years ago

mirshaibal commented 11 years ago

When we choose a verse then Comma delimited topics will be shown against this verse, may be right underneath the word by word translation. Or may be somewhere else more suited.

Moreover, topics will work like tag. Clicking on a topic will show all the relevant verses of that topic.

For example, if someone choose ayat "4:163" then it will show topics like "Aaron, Abraham, David, given the Psalms, Isaac, Ishmael, Jacob (Israel), Jesus, Job, Jonah, Psalms, given to David, Solomon" (according to the topic index file).

Now When someone clicks on a topic, it will show a floating DIV listing the relevant verse number with arabic & abdel haleem translation in a list. something like this:

21:30 Arabic English

22:30 Arabic English

oazabir commented 11 years ago

https://github.com/oazabir/Quran/wiki/Database-Design

oazabir commented 11 years ago

Please add a wiki page that explains your proposed schema.

mirshaibal commented 11 years ago

I have completed my task. Now i am learning git to upload my files. Should i create a new branch and up the code there or marge the code with master branch? should i create a new wiki page to explain this task?

I have a question regarding topicindex.html file: I have parse the html file and populate a table map with 'topic' & 'ayahs'. Some of the topic like

Allah
    a day for Him is
        a thousand human years, 22:47, 32:5
        fifty thousand years, 70:4 

Now, here are 2 topics

  1. a thousand human years --> 22:47, 32:5
  2. fifty thousand years --> 70:4

here basically topic title is related to 'Allah' & 'a day for Him is'. So should i include this parent node text along with topic title?

oazabir commented 11 years ago

Let's use the tags - "a thousand human years", "fifty thousand years". We probably have to use the last item that has the verse numbers against it as the tags.

mirshaibal commented 11 years ago

I have uploaded the files to the following location: https://github.com/mirshaibal/Quran

Read me file will explain about new/modified files.

oazabir commented 11 years ago

Excellent work!

Could you create a hierarchical index page, like the way the index html file is? Let's offer that html index page to the readers so that they can browse through the index and directly jump on a verse. Let's clean that html file and make the links relative like /1/1, /2/2.

I thought about generating the index from database, but the data in database isn't hierarchical.

Let's create a nice beautiful index and we can put a link on the top to that index page.

Please merge your code on the master branch. Let's work on master branch from now on.

Please make a small change:

var topics = (from t in _Quran.TopicAyahsMaps where t.Ayahs.Contains(selectedVerse + ",") select t);//.ToList().AsQueryable();

See the commented part. When you do .ToList() it fetches all the rows in one shot and builds a list. As you don't need a list here since you are only doing a foreach, you don't need to convert it to a List. A small optimization.

mirshaibal commented 11 years ago

For hierarchical index page, would you mean that in the TopicIndex.html file we just change the link of each ayahs to relative path like /1/1, /1/2 etc ?

oazabir commented 11 years ago

Yes, let's cleanup the page and make it work with our site.

4our commented 11 years ago

wasalaam all,

Good work! very very promising indeed. :) please check out this issue: https://github.com/mirshaibal/Quran/issues/1


ps: the code change for topics isnt merged properly back into Zabir's git. I was getting some errors when I downloaded his repo.

salaam.

oazabir commented 11 years ago

I have fixed my repo.

Shaibal, let's get your changes merged into your repo first and then I will merge from your repo into mine.

oazabir commented 11 years ago

I am also seeing irrelevant topics mapped to verses. I believe either the mapping or the retrieval logic is inaccurate.

mirshaibal commented 11 years ago

Yes. i get this issue. I am working on it. I also modify the hierarchical html topic index page (remove irrelevant attributes, modify link that redirects to proper ayahs to our application)

After fixing the issue, i will marge the code into my repo.

mirshaibal commented 11 years ago

I have taken the latest code from http://github.com/oazabir/Quran and incorporate all my changes with your code and host to http://github.com/mirshaibal/Quran

Please take my code from http://github.com/mirshaibal/Quran and marge it with master branch.

Please Check the ReadMe file and Run Database/TopicAyahsMaps-Schema-Data.sql

I have also create a hierarchical topic index page named "TopicIndex.html" located in the root folder. I just use the existing file and modify the link and remove some unnecessary attributes. Let me know if anything else needs to change in this file.

4our commented 11 years ago

wasalaam,

I got latest from mirshaibal's repo and tested it out. Working very well now. Alhamdulillah... Looking forward to seeing it get merged here inshaAllah. 2 thoughts:

salaam.

oazabir commented 11 years ago

I have deployed the relevant verse feature. Thank you very much for your work.

oazabir commented 11 years ago

I have found an issue that we need to address.

In the topic index we have topics in hierarchical fashion. For ex,

Abu Lahab (Abd al-Uzza), 111:1-3 his wife, 111:4-5

Now when we are on verse 111:4 and 111:5, the topic shows as "his wife". It is not clear what does "his wife" mean.

Let's populate the topic table in a way that it will use the parent and the child topic together and form one word. So, "his wife" will show as "Abu Lahab - his wife".

Same for topics like this:

Adam, 2:31-32, 3:33, 5:27, 7:19-25, 17:61, 17:70, 18:50, 19:58, 20:115-123, 40:31, 41:13, 41:15 angels to prostrate before, 2:34, 7:11 tree of knowledge, 2:35, 7:19, 20:120-121 banishment from Garden (no blame to Eve), 2:36, 7:24

Instead of showng "angels to pro..." it should show "Adam - angels to pro..."

mirshaibal commented 11 years ago

Thanks for raising this issue. I will populate the topic table as your suggested way.

mirshaibal commented 11 years ago

I am out of dhaka for few days, thats why i could not touch the issue. Inshaallah from middle of next week i will start working with issues.

mirshaibal commented 11 years ago

I have update the sql for table 'TopicAyahsMaps'

Please take the .sql file named "TopicAyahsMaps-Schema-Data.sql" from https://github.com/mirshaibal/Quran/tree/master/Database

Please let me know whether it is okay or not OR anything needs to do.