Expand description
Language detection module.
Provides utilities to detect language codes from file paths and names, using directory names, filename patterns, and file extensions.
§Examples
use subx_cli::core::language::LanguageDetector;
use std::path::Path;
let detector = LanguageDetector::new();
let code = detector.get_primary_language(Path::new("subtitle.sc.srt")).unwrap();
assert_eq!(code, "sc");
Structs§
- Language
Detector - Detector for identifying language codes from filesystem paths.
- Language
Info - Detected language information, including code, source, and confidence.
Enums§
- Language
Source - Source of detected language information.