Skip to content
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

Python script returning empty results #7

Open
MuntashirAkon opened this issue Jul 15, 2021 · 1 comment
Open

Python script returning empty results #7

MuntashirAkon opened this issue Jul 15, 2021 · 1 comment

Comments

@MuntashirAkon
Copy link

The python script tajweed_classifier.py is returning empty result when ran using the latest version of uthmani quran text exported from tanzil.net. I.e. the output contains all surah and verse numbers without any annotations:

[
  {
    "annotations": [],
    "ayah": 1,
    "surah": 1
  },
  {
    "annotations": [],
    "ayah": 2,
    "surah": 1
  },
  {
    "annotations": [],
    "ayah": 3,
    "surah": 1
  },
  ...
]

Additionally, the python scripts have no license (which automatically means that they're under a source-only license) making it impossible for us to re-use the scripts. Please, consider adding a license.

@MuntashirAkon
Copy link
Author

Figured out the issue:

diff --git a/tajweed_classifier.py b/tajweed_classifier.py
index 954aeee..480ac6a 100644
--- a/tajweed_classifier.py
+++ b/tajweed_classifier.py
@@ -407,7 +407,7 @@ def label_ayah(params):
 if __name__ == "__main__":
     # Load rules from incredibly high-tech datastore.
     rule_trees = {}
-    rule_start_files = glob.glob("output/rule_trees/*.start.json")
+    rule_start_files = glob.glob("rule_trees/*.start.json")
     for start_file in rule_start_files:
         rule_name = os.path.basename(start_file).partition(".")[0]
         end_file = start_file.replace(".start.", ".end.")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant