Skip to content

Commit 6d03637

Browse files
Merge pull request #57 from dreamer-coding/main
2 parents 27675f3 + 0598efe commit 6d03637

File tree

8 files changed

+428
-486
lines changed

8 files changed

+428
-486
lines changed

code/logic/fossil/io/soap.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,17 @@ int fossil_io_soap_detect_exaggeration(const char *text);
106106
*/
107107
char *fossil_io_soap_filter_offensive(const char *text);
108108

109+
/**
110+
* Detects whether the given text contains ragebait phrases.
111+
*
112+
* Ragebait phrases are text patterns designed to provoke anger,
113+
* outrage, or strong emotional reactions in the reader.
114+
*
115+
* @param text The input C string to analyze.
116+
* @return 1 if any ragebait phrase is detected, 0 otherwise.
117+
*/
118+
int fossil_io_soap_detect_ragebait(const char *text);
119+
109120
/**
110121
* @brief Check if input contains clickbait-style language.
111122
*
@@ -234,6 +245,19 @@ namespace fossil {
234245
return fossil_io_soap_detect_exaggeration(text.c_str()) != 0;
235246
}
236247

248+
/**
249+
* Detects whether the given text contains ragebait phrases.
250+
*
251+
* Ragebait phrases are text patterns designed to provoke anger,
252+
* outrage, or strong emotional reactions in the reader.
253+
*
254+
* @param text The input C string to analyze.
255+
* @return 1 if any ragebait phrase is detected, 0 otherwise.
256+
*/
257+
static int is_ragebait(const std::string &text) {
258+
return fossil_io_soap_detect_ragebait(text.c_str());
259+
}
260+
237261
/**
238262
* @brief Check if the input uses clickbait language.
239263
*

0 commit comments

Comments
 (0)