Module language

Source
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§

LanguageDetector
Detector for identifying language codes from filesystem paths.
LanguageInfo
Detected language information, including code, source, and confidence.

Enums§

LanguageSource
Source of detected language information.