langtest.transform.utils#

Functions

check_name(word, name_lists)

Checks if a word is in a list of list of strings

compare_generations_overlap(phrase)

Compare a given phrase against a list of offensive words and count the number of offensive words present in the phrase.

create_terminology(ner_data)

Iterate over the DataFrame to create terminology from the predictions.

filter_unique_samples(task, ...)

Filter and remove samples with no applied transformations from the list of transformed_samples.

get_default_font([font_size])

Returns a common font path available on all major operating systems.

get_substitution_names(values_list)

Helper function to get list of substitution names

Classes

AttackerLLM(client[, model])

AttackerLLM class to generate attack plans and modified questions for adversarial learning.

DataRetriever()

DataRetriever class to load and filter data from csv files

RepresentationOperation()

This class provides operations for analyzing and evaluating different representations in data.

ResponseEvaluator(model, case_id, ...[, n])

ResponseGenerator(model)

TargetLLM(client[, model])