utils: implement language-detector

A thing wrapper around CLD2 with which we can detect the language of an
e-mail message.
This commit is contained in:
Dirk-Jan C. Binnema
2023-05-11 23:19:31 +03:00
parent 0ed7dc2102
commit ad64093183
4 changed files with 167 additions and 2 deletions

View File

@ -17,6 +17,7 @@
lib_mu_utils=static_library('mu-utils', [
'mu-command-handler.cc',
'mu-lang-detector.cc',
'mu-logger.cc',
'mu-option.cc',
'mu-readline.cc',
@ -29,7 +30,8 @@ lib_mu_utils=static_library('mu-utils', [
gio_dep,
gio_unix_dep,
config_h_dep,
readline_dep
readline_dep,
cld2_dep
], include_directories:
include_directories(['.','..']),
install: false)
@ -72,4 +74,11 @@ test('test-logger',
cpp_args: ['-DBUILD_TESTS'],
dependencies: [glib_dep, lib_mu_utils_dep, thread_dep ]))
test('test-lang-detector',
executable('test-lang-detector', 'mu-lang-detector.cc',
install: false,
cpp_args: ['-DBUILD_TESTS'],
dependencies: [glib_dep, lib_mu_utils_dep, cld2_dep, config_h_dep]))
subdir('tests')