Gatsby767 commited on
Commit
e6579dc
·
verified ·
1 Parent(s): 5fbe5e3

Update metrics.py

Browse files
Files changed (1) hide show
  1. metrics.py +6 -0
metrics.py CHANGED
@@ -1,5 +1,11 @@
1
  import re
2
 
 
 
 
 
 
 
3
  def humility_score(text):
4
  humility_keywords = ["I may be wrong", "I don't know", "uncertain", "open to correction", "not sure"]
5
  score = sum(1 for phrase in humility_keywords if phrase in text.lower())
 
1
  import re
2
 
3
+ def get_metrics(text):
4
+ return {
5
+ "humility_score": humility_score(text),
6
+ "bias_confession_rate": bias_confession_rate(text)
7
+ }
8
+
9
  def humility_score(text):
10
  humility_keywords = ["I may be wrong", "I don't know", "uncertain", "open to correction", "not sure"]
11
  score = sum(1 for phrase in humility_keywords if phrase in text.lower())