You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Text-analyzer top words include punctuation-only tokens such as "" and "-" #736
The bundled text-analyzer reference skill (src/skillevaluator/tier3/reference_skills/text-analyzer/scripts/analyze_text.py) builds its "Top words" list from text.split() tokens with only a fixed set of punctuation stripped. Tokens that are only punctuation end up in the list:
an ellipsis ... strips to the empty string, so "" is reported as a top word;
a dash -, en/em dash –/—, &, etc. aren't stripped at all and are reported as words.
For text with dashes or ellipses these entries take up places in the top 5 and push real words out, and the text report prints a blank row.
Expected: top words only contain tokens that actually contain a letter or digit, so punctuation-only tokens aren't counted as words in the frequency list.
Reproduction steps
python3 src/skillevaluator/tier3/reference_skills/text-analyzer/scripts/analyze_text.py --json \
--text 'Wait... what? ... ok ... - fine - yes!'
Activity