Spaces:
Sleeping
Sleeping
neuralworm
commited on
Commit
·
5bb3a98
1
Parent(s):
9be760a
patch app, db
Browse files
app.py
CHANGED
@@ -111,7 +111,7 @@ def run_test():
|
|
111 |
|
112 |
# Lade die Test-JSON-Inhalte für 00.json
|
113 |
test_texts_00 = process_json_files(0, 0)
|
114 |
-
db(test_texts_00, max_phrase_length=
|
115 |
matching_phrases_00 = search_gematria_in_db(expected_gematria)
|
116 |
assert matching_phrases_00, "Keine passenden Phrasen gefunden in 00.json."
|
117 |
assert matching_phrases_00[0][0].replace(" ", "") == test_phrase, f"Gefundene Phrase stimmt nicht überein: {matching_phrases_00[0][0]}"
|
@@ -120,7 +120,7 @@ def run_test():
|
|
120 |
# Lade die Test-JSON-Inhalte für 01.json
|
121 |
test_texts_01 = process_json_files(1, 1)
|
122 |
db(test_texts_01, max_phrase_length=2) # Populate the database with 1-word phrases
|
123 |
-
search_phrase_01 = "
|
124 |
expected_gematria_01 = calculate_gematria(search_phrase_01.replace(" ", ""))
|
125 |
|
126 |
matching_phrases_01 = search_gematria_in_db(expected_gematria_01)
|
|
|
111 |
|
112 |
# Lade die Test-JSON-Inhalte für 00.json
|
113 |
test_texts_00 = process_json_files(0, 0)
|
114 |
+
db(test_texts_00, max_phrase_length=22) # Populate the database with 1-word phrases
|
115 |
matching_phrases_00 = search_gematria_in_db(expected_gematria)
|
116 |
assert matching_phrases_00, "Keine passenden Phrasen gefunden in 00.json."
|
117 |
assert matching_phrases_00[0][0].replace(" ", "") == test_phrase, f"Gefundene Phrase stimmt nicht überein: {matching_phrases_00[0][0]}"
|
|
|
120 |
# Lade die Test-JSON-Inhalte für 01.json
|
121 |
test_texts_01 = process_json_files(1, 1)
|
122 |
db(test_texts_01, max_phrase_length=2) # Populate the database with 1-word phrases
|
123 |
+
search_phrase_01 = "אתקלך שמעתי"
|
124 |
expected_gematria_01 = calculate_gematria(search_phrase_01.replace(" ", ""))
|
125 |
|
126 |
matching_phrases_01 = search_gematria_in_db(expected_gematria_01)
|