Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions code/logic/fossil/io/soap.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ int fossil_io_soap_detect_exaggeration(const char *text);
*/
char *fossil_io_soap_filter_offensive(const char *text);

/**
* Detects whether the given text contains ragebait phrases.
*
* Ragebait phrases are text patterns designed to provoke anger,
* outrage, or strong emotional reactions in the reader.
*
* @param text The input C string to analyze.
* @return 1 if any ragebait phrase is detected, 0 otherwise.
*/
int fossil_io_soap_detect_ragebait(const char *text);

/**
* @brief Check if input contains clickbait-style language.
*
Expand Down Expand Up @@ -234,6 +245,19 @@ namespace fossil {
return fossil_io_soap_detect_exaggeration(text.c_str()) != 0;
}

/**
* Detects whether the given text contains ragebait phrases.
*
* Ragebait phrases are text patterns designed to provoke anger,
* outrage, or strong emotional reactions in the reader.
*
* @param text The input C string to analyze.
* @return 1 if any ragebait phrase is detected, 0 otherwise.
*/
static int is_ragebait(const std::string &text) {
return fossil_io_soap_detect_ragebait(text.c_str());
}

/**
* @brief Check if the input uses clickbait language.
*
Expand Down
Loading
Loading