File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,17 @@ int fossil_io_soap_detect_exaggeration(const char *text);
106106 */
107107char *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 *
You can’t perform that action at this time.
0 commit comments