| Crates.io | alphabet_detector |
| lib.rs | alphabet_detector |
| version | 0.9.1 |
| created_at | 2025-01-31 11:48:47.163386+00 |
| updated_at | 2025-07-29 15:46:50.82148+00 |
| description | Natural language alphabet detection library |
| homepage | |
| repository | https://github.com/RoDmitry/alphabet_detector |
| max_upload_size | |
| id | 1537452 |
| size | 347,618 |
One language can be written in multiple scripts, so it will be detected as a different
ScriptLanguage(language + script)
Does not have any models, just matches the alphabet. Not recommended to use as a standalone detector.
It's more like a word separator + language prefilter for an actual language detector (Langram).
Splits text (iterator CharIndices) to words, and detects ScriptLanguages (language + script) of words by used letters (chars).
Look at the alphabets.rs to understand what languages have already defined alphabets. Some of them need validation.
Warning: can return words with chars from the Unicode private area (for example Lingala, Nuer or Yoruba languages), because of char normalization (composition with Inherited), and there are no such chars defined in Unicode.