File size: 206 Bytes
1117b7b
 
 
 
 
 
 
1
2
3
4
5
6
7
8
def confidence_score(intent, sentiment):
    score = 70
    if sentiment == "NEGATIVE":
        score -= 20
    if intent in ["Support", "Complaint"]:
        score += 10
    return max(0, min(100, score))