Spaces:
Sleeping
Sleeping
File size: 806 Bytes
f73646a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | COMPUTATION_KEYWORDS = [
# aggregations
"average",
"mean",
"sum",
"total",
"count",
"maximum",
"minimum",
"highest",
"lowest",
"top",
"best",
"worst",
# comparisons
"compare",
"difference",
"greater",
"less",
# statistics
"correlation",
"distribution",
"median",
"std",
"variance",
# filtering
"how many",
"which",
"what category",
"group by",
# trends
"trend",
"growth",
# percentages
"percentage",
"ratio",
"proportion"
]
def requires_python_analysis(question):
q = question.lower()
for keyword in COMPUTATION_KEYWORDS:
if keyword in q:
return True
return False |