Documentation/Core
TextHighlighter
The TextHighlighter module provides functionality to highlight specific keywords in text, supporting both single-word and multi-word highlighting with customizable markers.
Info: This documentation provides interactive code views for each method. Click on a function name to view its implementation.
Module Overview
Constructor
Parameters:
max_ngram_size(int): Maximum size of n-grams to consider for highlightinghighlight_pre(str, optional): Text to insert before highlighted terms (default:<kw>)highlight_post(str, optional): Text to insert after highlighted terms (default:</kw>)
Core Methods
Helper Methods
Usage Example
Dependencies
The TextHighlighter module relies on:
re: For regular expression operations in text processinglogging: For error handling and reporting