π€ AI Summary
Slash-Dash is a lightweight Node.js package that replaces em-dashes and en-dashes in text with context-appropriate punctuation using a small NLP pipeline. Aimed at cleaning up output from LLMs and other generators that overuse dashes, it asynchronously returns processedText plus a meta array of edits (index, replacement, confidence, reason, contextSnippet). By default it handles em- and en-dashes (β, β, ---, --) and can be configured to target only one type.
Under the hood Slash-Dash uses the compromise JavaScript NLP library to analyze parts of speech, sentence boundaries, clause types (independent vs. dependent), appositives, lists and other grammatical patterns. That analysis drives choices among commas, periods, colons, semicolons or even space (for decorative dashes), with a confidence score and a human-readable reason for each replacement. For engineers and researchers, itβs useful as a postprocessing step to make LLM output more human-like, improve readability, reduce downstream parsing errors, and add auditability via per-edit metadata. The package targets Node.js >= 14, is MIT-licensed, and is simple to integrate into generation pipelines or data-cleaning workflows.
Loading comments...
login to comment
loading comments...
no comments yet