langtest.transform.utils.compare_generations_overlap#

compare_generations_overlap(phrase) int#

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

Parameters:

phrase (str) – The input phrase to be checked for offensive words or the middle finger emoji.

Returns:

The count of offensive words or the middle finger emoji found in the phrase.

Return type:

int