aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/lang_detection.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-05-02 17:56:14 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-05-02 17:56:14 +0100
commitbf00268444b2e11ac5378d4986d6d55d1038a775 (patch)
tree15c4651c063bedc7d0372b64cc18f025e9e89c52 /src/libmime/lang_detection.c
parent915885232b2cffeab1fe7be02df89fba4fea3255 (diff)
downloadrspamd-bf00268444b2e11ac5378d4986d6d55d1038a775.tar.gz
rspamd-bf00268444b2e11ac5378d4986d6d55d1038a775.zip
[Fix] Feed fasttext language model with the pre-tokenized words
Diffstat (limited to 'src/libmime/lang_detection.c')
-rw-r--r--src/libmime/lang_detection.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libmime/lang_detection.c b/src/libmime/lang_detection.c
index 62d04975c..d4d10b216 100644
--- a/src/libmime/lang_detection.c
+++ b/src/libmime/lang_detection.c
@@ -1836,8 +1836,7 @@ rspamd_language_detector_detect (struct rspamd_task *task,
if (rspamd_lang_detection_fasttext_is_enabled(d->fasttext_detector)) {
rspamd_fasttext_predict_result_t fasttext_predict_result =
rspamd_lang_detection_fasttext_detect(d->fasttext_detector,
- part->utf_stripped_content->data,
- part->utf_stripped_content->len, 4);
+ part->utf_words, 4);
ndetected = rspamd_lang_detection_fasttext_get_nlangs(fasttext_predict_result);