clustered_lines_to_html(lines: list, map_row_cluster: dict, row_to_html=None, line_to_html=None, skip_line=None, show_caption: bool = True, map_cluster_name: Optional[dict] = None) str[source]

Exports a list of clustered str to HTML.

  • lines (list) – The list of strings where each string corresponds to the lines of the input file.

  • map_row_cluster (dict) – Maps each row (int) with the corresponding cluster ID.

  • row_to_htmlCallback(int, str) -> str mapping the row (line number) and the line content with the corresponding HTML rendering of the line. See also RowFormatter.

  • line_to_html (callable) – A Callback(int, str) -> str taking in parameters the row (line number) and the line content, and returning the corresponding HTML rendering.

  • skip_line (callable) – A Callback(int, str) -> bool taking in parameters the row and the line content, and returning True if the line is relevant. By default, all lines are considered.

  • show_caption (bool) – Pass False to hide the caption mapping each cluster with its corresponding color. Defaults to True.

  • map_cluster_name (dict) – Maps each cluster ID with its corresponding name.


The corresponding HTML string.