serb_stem 0.1.4

A high-performance Serbian stemming library supporting both Cyrillic and Latin scripts (Ekavica).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// src/normalization.rs

pub fn ekavize(text: &str) -> String {
    text.replace("ije", "e")
        .replace("IJE", "E")
}

pub fn normalize_case(text: &str) -> String {
    text.to_lowercase()
}

pub fn remove_punctuation(text: &str) -> String {
    text.chars().filter(|c| c.is_alphanumeric() || c.is_whitespace()).collect()
}