aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-01-13 17:41:57 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-01-13 17:41:57 +0000
commitb72c8f94ccbbe8362b38a4a9f35823367ad21a9c (patch)
treec8c79328cf10c669021b9a3df761e3bd9c5d36ab /src/libstat/backends
parent88950e4e4f563caba44a14a40b1180be27b772d0 (diff)
downloadrspamd-b72c8f94ccbbe8362b38a4a9f35823367ad21a9c.tar.gz
rspamd-b72c8f94ccbbe8362b38a4a9f35823367ad21a9c.zip
[Project] Preliminary version of ngramms based language detector
Diffstat (limited to 'src/libstat/backends')
-rw-r--r--src/libstat/backends/sqlite3_backend.c4
1 files changed, 2 insertions, 2 deletions
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;
}