cpfair / quran-tajweed

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

Hello I need to run this code in another text version #4

Open engeslamsaad opened 4 years ago

engeslamsaad commented 4 years ago

Hello, I run this code with same text from tanzil.net (with aya numbers ) and i got empty annotations for whole ayas Do i make any changes or what ? Here is sample output { "surah": 2, "ayah": 13, "annotations": [] }, { "surah": 2, "ayah": 14, "annotations": [] },

bekzattt commented 4 years ago

Simplest way of solving this I think would be just using original file in repo tajweed.hafs.uthmani-pause-sajdah.json

and shifting all annotations positions by length of additional text that comes before actual ayah.

Example: Quran text line: “[255][arabictext]” Shift all annotations for that aya by length 3

Hope it helps.

engeslamsaad commented 4 years ago

@bekzattt i need to run same code to same text but it didn't work btw

cpfair commented 4 years ago

The current decision trees rely on the various pronunciation markers only present in the Uthmani text, so running it on other versions of the text lacking the markers won't work (or will be inaccurate).

You may be able to map the rule boundaries from the text used in this repo to your own text based on the basic Arabic characters, ignoring tashkeel etc. (only look at the Lo Unicode class), though this will leave some rules stranded without a mapping.

engeslamsaad commented 4 years ago

Hello, will the script work with another different text Uthmani version from tanzil.net Thanks