modifiers.line_remover#

Module Contents#

Classes#

LineRemover

Removes lines from a document if the content of the line matches a given string.

API#

class modifiers.line_remover.LineRemover(patterns: list[str])#

Bases: nemo_curator.modifiers.DocumentModifier

Removes lines from a document if the content of the line matches a given string.

Initialization

Args: patterns (List[str]): The patterns to check

modify_document(text: str) str#