lynn-twinkl
commited on
Commit
·
cf1fac1
1
Parent(s):
a87c3ff
fixed bug that was preventing vulnerability scores from being assigned
Browse files
functions/necessity_index.py
CHANGED
|
@@ -28,7 +28,7 @@ LEXICON = {
|
|
| 28 |
"improve", "amazing", "difference", "dream", "opportunity",
|
| 29 |
"empower", "nurture", "change", "impact", "grateful", "please",
|
| 30 |
"!", 'passion', 'passionate', 'committed', 'life-changing',
|
| 31 |
-
'thank you', 'thankful'
|
| 32 |
],
|
| 33 |
"superlatives": [
|
| 34 |
"most", "every", "all", "huge", "massive", "dramatically",
|
|
@@ -87,7 +87,7 @@ def compute_necessity(text):
|
|
| 87 |
totals['urgency_score'] += category_count
|
| 88 |
elif category == "severity_markers":
|
| 89 |
totals['severity_score'] += category_count
|
| 90 |
-
elif category == "
|
| 91 |
totals['vulnerability_score'] += category_count
|
| 92 |
|
| 93 |
return pd.Series(totals)
|
|
|
|
| 28 |
"improve", "amazing", "difference", "dream", "opportunity",
|
| 29 |
"empower", "nurture", "change", "impact", "grateful", "please",
|
| 30 |
"!", 'passion', 'passionate', 'committed', 'life-changing',
|
| 31 |
+
'thank you', 'thankful', 'love'
|
| 32 |
],
|
| 33 |
"superlatives": [
|
| 34 |
"most", "every", "all", "huge", "massive", "dramatically",
|
|
|
|
| 87 |
totals['urgency_score'] += category_count
|
| 88 |
elif category == "severity_markers":
|
| 89 |
totals['severity_score'] += category_count
|
| 90 |
+
elif category == "vulnerability_markers":
|
| 91 |
totals['vulnerability_score'] += category_count
|
| 92 |
|
| 93 |
return pd.Series(totals)
|