bhardwaj08sarthak commited on
Commit
131415f
·
verified ·
1 Parent(s): 1f32a04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -77,7 +77,23 @@ def classify_and_score(
77
  target_dok: str,
78
  agg: str = "max"
79
  ) -> dict:
80
- """Classify a question against Bloom’s and DOK targets and return guidance."""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  res = classify_levels_phrases(
82
  question,
83
  BLOOMS_PHRASES,
 
77
  target_dok: str,
78
  agg: str = "max"
79
  ) -> dict:
80
+ """Classify a question against Bloom’s and DOK targets and return guidance.
81
+
82
+ Args:
83
+ question: The question text to evaluate for cognitive demand.
84
+ target_bloom: Target Bloom’s level or range. Accepts exact (e.g., "Analyze")
85
+ or plus form (e.g., "Apply+") meaning that level or higher.
86
+ target_dok: Target DOK level or range. Accepts exact (e.g., "DOK3")
87
+ or span (e.g., "DOK2-DOK3").
88
+ agg: Aggregation method over phrase similarities within a level
89
+ (choices: "mean", "max", "topk_mean").
90
+
91
+ Returns:
92
+ A dictionary with:
93
+ ok: True if both Bloom’s and DOK match the targets.
94
+ measured: Dict with best levels and per-level scores for Bloom’s and DOK.
95
+ feedback: Brief guidance describing how to adjust the question to hit targets.
96
+ """
97
  res = classify_levels_phrases(
98
  question,
99
  BLOOMS_PHRASES,