pyrit.prompt_converter.WordKeywordSelectionStrategy#
- class WordKeywordSelectionStrategy(*, keywords: List[str], case_sensitive: bool = True)[source]#
Bases:
WordSelectionStrategySelects words that match specific keywords.
- __init__(*, keywords: List[str], case_sensitive: bool = True) None[source]#
Initializes the word keyword selection strategy.
Methods
__init__(*, keywords[, case_sensitive])Initializes the word keyword selection strategy.
select_range(*, text[, word_separator])Selects a character range by first selecting words, then converting to character positions.
select_words(*, words)Selects words that match the keywords.