-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript usage, resultat differs from usual versions #6
Comments
Hi @korbav ! I had same issue in my app, you can read here It's happening because your version of quranic text doesn't contain pause marks and juz signs, while json from this repo was generated on quranic text with these marks. I recommend whenever you see such pause mark, just do positionsShift++ then you can highlight range from (ruleStart+positionsShift) to (ruleEnd+positionsShift) Hope it helps, if you have more questions, please just ask :) |
Hi @bekzattt , Thanks a lot for your help, I enhanced a bit the parsing so that it outputs less DOM elements, and I get something much closer to the expected result, but still, not quite the same. I had noticed that we must use the Othmani script including pause and sajdah signs : So I think I'm using the correct version. On the following picture, I compare, a version of the tajweed found on the web, and the output of the script Im running with this repo, we can see a lot of differences, I don't know how important they are but, definitely, it's noticeable : For information, the last version of my Javascript code to output this result (running for each ayah) is now this one :
From what you said @bekzattt it will also need to handle the pause marks but for now, at least on the verses I'm showing in the picture, there's no pause marks so it can' be the problem. I notice also that madd2 rules are never visible (even though the script will output |
Hi again @bekzattt, Would you mind sharing your algorithm? I'm still struggling with being aligned to existing official tajweed Qurans. From your advice about sleeping signs (waqfs), I'm looking for them with the following regular expression :
Then for each tajweed rule, I'm offsetting the But I'm still observing misalignments, with Muslim Pro tajweed as a reference for example : Comparison : As you can see :
Again, am I missing something? is there any scientific tajweed we can rely on? might there be any mistakes with the tajweed rules generated by this project? |
@korbav sorry for delay, I will try to get back to you tomorrow |
Hi @korbav
|
Also regarding pause marks, don't forget to add +2 to positionsShift, 1 for pause mark + 1 for extra space after pause mark. |
Hi @bekzattt,
This is what I'm running right now to adjust all the original rules coming from the project :
Thanks! |
Thanks for this phenomenal work.
I'm using Javascript to parse the rules and apply CSS classes to colorize the verses.
Nevertheless, it seems I miss something since the result I get (except, of course, that the colours rules are obviously not the same everywhere), is quite different from whatever I can find anywhere else.
This is what I get (using the original othmani json file available on this repository) :
And this is what one PDF version I found outputs :
The code I'm using to parse the rules is the following :
Then I have a CSS set of rules to colorize everything :
And for each verse, I split all the characters this way to apply the rules (simplified version of the code) :
It would be great if you could give your thoughts about what is being wrong!
@cpfair @Ysajid
The text was updated successfully, but these errors were encountered: