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:
		
							parent
							
								
									658996d5d5
								
							
						
					
					
						commit
						2268f9ca14
					
				| 
						 | 
				
			
			@ -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(),
 | 
			
		||||
    );
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue