From 2268f9ca14ee2cfc5cc57671d71ee3e0b74030ba Mon Sep 17 00:00:00 2001 From: Aleksei Voronov Date: Sat, 23 Sep 2023 20:39:51 +0200 Subject: [PATCH] Limit language detector to only use cyrillic script The makes the memory consumption like 100Mb, which is much more reasonable than 1Gb that it was using previously --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 72dc045..23c233d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,7 +29,7 @@ async fn main() -> Result<()> { info!("Initializing language detector"); let language_detector = Arc::new( - LanguageDetectorBuilder::from_all_languages() + LanguageDetectorBuilder::from_all_languages_with_cyrillic_script() .with_preloaded_language_models() .build(), );