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
This commit is contained in:
Aleksei Voronov 2023-09-23 20:39:51 +02:00
parent 658996d5d5
commit 2268f9ca14
1 changed files with 1 additions and 1 deletions

View File

@ -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(),
);