Here’s a simple tool in Python that highlights repeated phrases in a text. It finds n-grams (e.g., sequences of 2–5 words) that appear more than once and highlights them using color in terminal output or wraps them in a custom format (like **bold**
) for web use.
Python Tool to Highlight Repeated Phrases
Features:
-
Identifies repeated phrases of 2 to 5 words by default.
-
Case-insensitive matching.
-
Highlights using
**
markers by default (you can change it to HTML spans for web). -
Ignores one-word repetitions.
Let me know if you want a version that runs in-browser (JavaScript) or integrates with a web editor.
Leave a Reply