From b72c8f94ccbbe8362b38a4a9f35823367ad21a9c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 13 Jan 2018 17:41:57 +0000 Subject: [Project] Preliminary version of ngramms based language detector --- src/libstat/backends/sqlite3_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstat/backends/sqlite3_backend.c') diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c index 6563d0dc1..8682ca73f 100644 --- a/src/libstat/backends/sqlite3_backend.c +++ b/src/libstat/backends/sqlite3_backend.c @@ -365,8 +365,8 @@ rspamd_sqlite3_get_language (struct rspamd_stat_sqlite3_db *db, for (i = 0; i < task->text_parts->len; i++) { tp = g_ptr_array_index (task->text_parts, i); - if (tp->lang_code != NULL && tp->lang_code[0] != '\0' && - strcmp (tp->lang_code, "en") != 0) { + if (tp->language != NULL && tp->language[0] != '\0' && + strcmp (tp->language, "en") != 0) { language = tp->language; break; } -- cgit v1.2.3