Spaces:
Sleeping
Sleeping
Commit
·
3f8c999
1
Parent(s):
6d08b4f
fix els length bug
Browse files- els_cache.db +0 -3
- quran.py +5 -8
els_cache.db
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:0a004526012b982e2de91216dd0b4c155170f37a6ed3ff72d56f904583784a72
|
3 |
-
size 28672
|
|
|
|
|
|
|
|
quran.py
CHANGED
@@ -243,14 +243,11 @@ def get_first_els_result_quran(gematria_sum: int, tlang: str = "en") -> Dict[str
|
|
243 |
positions = []
|
244 |
pos = start_pos
|
245 |
|
246 |
-
# Extract
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
pos += gematria_sum
|
252 |
-
else:
|
253 |
-
break
|
254 |
|
255 |
if len(extracted) >= 3: # At least 3 characters
|
256 |
# Look up the sura/verse for the first and last character
|
|
|
243 |
positions = []
|
244 |
pos = start_pos
|
245 |
|
246 |
+
# Extract until the end of the text is reached
|
247 |
+
while pos < len(text_no_spaces):
|
248 |
+
extracted += text_no_spaces[pos]
|
249 |
+
positions.append(pos)
|
250 |
+
pos += gematria_sum
|
|
|
|
|
|
|
251 |
|
252 |
if len(extracted) >= 3: # At least 3 characters
|
253 |
# Look up the sura/verse for the first and last character
|