diff options
Diffstat (limited to 'src/libmime/lang_detection.h')
-rw-r--r-- | src/libmime/lang_detection.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libmime/lang_detection.h b/src/libmime/lang_detection.h index 3eaa4e286..b1382e6ad 100644 --- a/src/libmime/lang_detection.h +++ b/src/libmime/lang_detection.h @@ -50,6 +50,14 @@ enum rspamd_unicode_scripts { RSPAMD_UNICODE_HANGUL = (1 << 16), }; +enum rspamd_language_elt_flags { + RS_LANGUAGE_DEFAULT = 0, + RS_LANGUAGE_LATIN = (1 << 0), + RS_LANGUAGE_TIER1 = (1 << 3), + RS_LANGUAGE_TIER0 = (1 << 4), + RS_LANGUAGE_DIACRITICS = (1 << 5), +}; + struct rspamd_lang_detector_res { gdouble prob; const gchar *lang; @@ -88,7 +96,12 @@ gboolean rspamd_language_detector_detect (struct rspamd_task *task, gboolean rspamd_language_detector_is_stop_word (struct rspamd_lang_detector *d, const gchar *word, gsize wlen); - +/** + * Return language flags for a specific language elt + * @param elt + * @return + */ +gint rspamd_language_detector_elt_flags (const struct rspamd_language_elt *elt); #ifdef __cplusplus } #endif |