cpfair / quran-tajweed

Tajweed annotation for the Qur'an
126 stars 49 forks source link

Pause marks and sajdah signs #2

Closed bekzattt closed 6 years ago

bekzattt commented 6 years ago

Description of repository says: Make sure to download the version with pause marks and sajdah signs, but without rub-el-hizb signs or me_quran tanween shapes. If you use different options or a different text entirely, you must rebuild the data file from scratch (at your own risk) - refer to the next section. It looks like when downloading Quranic text from tanzil with checkmarks selected for pause marks and sajdah signs, downloaded file doesn't include these symbols.

I guess it also happened when you were generating tajweed.hafs.uthmani-pause-sajdah.json . It works well with version without pause marks, but position are moved after pause marks.

I already reported a problem regarding missed signs on tanzil.net

screen shot 2018-01-05 at 12 24 53 am
cpfair commented 6 years ago

Yes, I had noticed this issue before - and I'm not sure why I didn't just post the data file I used, to eliminate problems in the future like this. I must have mis-read their license at the time, maybe I thought that redistribution of the original files wasn't permitted.

bekzattt commented 6 years ago

First of all, may Allah Reward you and Bless you for open sourcing this amazing work. Thank you very much!

  1. I found that problem with pause marks on tanzil.net occurred since last year. Reported it, but still no answer.
  2. Meanwhile because I already had Quranic text with pause marks and juz signs in my app, I searched in github repositories for older version of quran-uthmani.txt with ayah numbers, pause marks and without juz signs to run tajweed_classifier.py with it. I found right file here: (https://github.com/karimouda/qurananalysis/blob/HEAD/data/quran-uthmani.txt)

After running tajweed_classifier.py with Quran with pause marks, I found there are some problems in scenarios when there is pause mark in the middle of tajweed rule. Like here:

screen shot 2018-01-21 at 8 59 04 pm screen shot 2018-01-21 at 8 58 48 pm

@cpfair Could you please help how to handle this scenario ?

bekzattt commented 6 years ago

Solved this problem just by using original tajweed.hafs.uthmani-pause-sajdah.json and shifting all annotations positions by by the number of pause marks which comes before them.

korbav commented 3 years ago

Solved this problem just by using original tajweed.hafs.uthmani-pause-sajdah.json and shifting all annotations positions by by the number of pause marks which comes before them.

Hi @bekzattt , following your reasoning, I tried to do the same thing you did: Shifting the positions by a number equal to the number of pause marks coming before the rule position.

Based on [Based on https://tanzil.net/docs/pause_marks](Based on https://tanzil.net/docs/pause_marks), we have 6 different pause marks to take care of, which are :

Your advice seems to enhance the overall result but there are clearly some mistakes :

Example with surah 4 ayah 171 :

image

As you can see, most of the rules are applied as expected, but not all of them.

I created a sandbox so that you can test it in live and view the code I'm using : https://codesandbox.io/s/nice-kowalevski-ngkoi?file=/src/App.js

It would be wonderful if you could either sharing your algorithm or commenting mine?

PS: @cpfair what would be your input on that?