-
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
Get unexpected result #8
Comments
It appears that tanzil.net has made some minor encoding changes to the text, so the indices no longer align. I have attached the original quran-uthmani.txt file I used when when generating the rule files - in shaa Allah I will look at regenerating them to match the current tanzil.net format. quran-uthmani.txt (downloaded from Tanzil.net ca. Apr 6, 2017). |
Jazaakallahu khairan, I will try to use it. |
Tested with 2:2 with no problem, but with 2:3 the problem still exists. The code still same with the above, only for the start changed as because the substring index begin from 0; rules.forEach(rule => {
const subText = text.substring(rule.start - 1, rule.end); // changed to: rule.start - 1
console.log(rule.start + " - " + rule.end + ": " + rule.rule);
console.log(subText);
}); any idea? |
Based on the reference material used in generating the rulesets, the dal is not included in that rule. E.g. http://recitequran.com/2:2 (highlights the fathatain on the dal, but not the dal itself). And, due to the way the rules are represented in this system, they can apply only to a contiguous span of codepoints (whereas in this case it may be better if it could cover two disjoint spans, as seen in the ReciteQuran link above). |
Thank you, so this is my misunderstanding about the implementation of the rules. |
Wonderful. That could also explain the issues I raised in another comment.
I noticed you're using Javascript as well. |
@korbav Currently I use the tajweed version by Quran.com API. I really don’t dare to take any risks for use using this way for now. |
That seems to be a great option. |
That API looks nice. I've added it to the readme as a suggested alternative, given that this project hasn't been maintained in some time. |
I just follow the instructions, but got the wrong result.
Here is my code to extract the data
And here is the result
Am I doing something wrong?
Thanks in advance
The text was updated successfully, but these errors were encountered: