Update scrolls.py
Browse files- scrolls.py +8 -1
scrolls.py
CHANGED
|
@@ -15,4 +15,11 @@ def evaluate_alignment(solution_text):
|
|
| 15 |
keywords = ["compassion", "truth", "justice", "mercy", "covenant", "redemption"]
|
| 16 |
score = sum(1 for word in keywords if word in solution_text.lower())
|
| 17 |
return score / len(keywords)
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
keywords = ["compassion", "truth", "justice", "mercy", "covenant", "redemption"]
|
| 16 |
score = sum(1 for word in keywords if word in solution_text.lower())
|
| 17 |
return score / len(keywords)
|
| 18 |
+
|
| 19 |
+
def interpret_scroll(text):
|
| 20 |
+
alignment_score = evaluate_alignment(text)
|
| 21 |
+
return {
|
| 22 |
+
"scroll_interpretation": f"Spiritual alignment score: {alignment_score:.2f}"
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
|