Commit
·
9a815f6
1
Parent(s):
9abd5a8
fix: add missing filler_ratio to detect_filler_words return value
Browse files
app/services/articulation.py
CHANGED
|
@@ -191,12 +191,16 @@ class ArticulationService:
|
|
| 191 |
if word not in filler_found:
|
| 192 |
filler_found.append(word)
|
| 193 |
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
| 195 |
if filler_found:
|
| 196 |
print(f" Found: {', '.join(filler_found)}")
|
| 197 |
|
| 198 |
return {
|
| 199 |
'filler_count': filler_count,
|
|
|
|
| 200 |
'filler_words_found': filler_found
|
| 201 |
}
|
| 202 |
|
|
|
|
| 191 |
if word not in filler_found:
|
| 192 |
filler_found.append(word)
|
| 193 |
|
| 194 |
+
# Calculate filler ratio
|
| 195 |
+
filler_ratio = filler_count / total_words if total_words > 0 else 0
|
| 196 |
+
|
| 197 |
+
print(f" Filler Words: {filler_count}/{total_words} ({filler_ratio*100:.1f}%)")
|
| 198 |
if filler_found:
|
| 199 |
print(f" Found: {', '.join(filler_found)}")
|
| 200 |
|
| 201 |
return {
|
| 202 |
'filler_count': filler_count,
|
| 203 |
+
'filler_ratio': filler_ratio,
|
| 204 |
'filler_words_found': filler_found
|
| 205 |
}
|
| 206 |
|