#scheme #cyrillic #latin #transliteration #script #russian #engine

cranberry

Transliteration of Russian Cyrillic into Latin Script

8 releases (4 breaking)

0.5.0 Feb 8, 2025
0.4.1 Feb 4, 2025
0.3.1 Jan 4, 2025
0.2.0 Dec 15, 2024
0.1.1 Dec 15, 2024

#2 in #russian

Download history 271/week @ 2024-12-11 43/week @ 2024-12-18 225/week @ 2025-01-01 21/week @ 2025-01-08 120/week @ 2025-01-29 236/week @ 2025-02-05 30/week @ 2025-02-12 2/week @ 2025-02-19 5/week @ 2025-02-26

354 downloads per month

MIT license

30KB
1K SLoC

Cranberry is a versatile Rust library for transliterating Russian Cyrillic text to Latin script, addressing the challenge of inconsistent romanization standards across different applications. The library provides multiple transliteration schemes while maintaining exceptional performance and ease of integration.

License: MIT Crates.io

Installation

Add to your Cargo.toml:

[dependencies]
cranberry = "0.5.0"

Or use cargo:

cargo add cranberry

Usage

use cranberry;

fn main() {
    let expected = "V ċas̈ax ȷuga żil bı citrus? Da, no falȷṡivıȷ ekzėmplȧr!";

    let source = "В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!";
    let fact = cranberry::Scheme::Cranberry.init().process(&source.to_string());

    assert_eq!(expected, fact);
}

Engines

Cranberry currently supports the following transliteration engines:

Engine Scheme Pangram
cranberry::Scheme::Cranberry Cranberry V ċas̈ax ȷuga żil bı citrus? Da, no falȷṡivıȷ ekzėmplȧr!
cranberry::Scheme::Soviet1 Soviet #1 V cascax juga ƶil by çitrus? Da, no falíşivyj ekzemplár!
cranberry::Scheme::Soviet2 Soviet #2 V cascax juga ƶil by çitrus? Da, no faljşivyj ekzemplär!
cranberry::Scheme::Soviet3 Soviet #3 V cascax juga ƶil bь çitrus? Da, no faljşivьj ekzemplər!
cranberry::Scheme::ISO1954 ISO 9 1954 V čaščah juga žil by citrus? Da, no fal'šivyj èkzempljar!
cranberry::Scheme::ISO1968Base ISO 9 1968 Base V čaŝah ûga žil by citrus? Da, no fal'šivyj èkzemplǎr!
cranberry::Scheme::ISO1968Alt1 ISO 9 1968 Alternative #1 V čaščach juga žil by citrus? Da, no fal'šivyj èkzempljar!
cranberry::Scheme::ISO1968Alt2 ISO 9 1968 Alternative #2 V chashchakh yuga zhil by tsitrus? Da, no fal'shivyĭ èkzemplyar!
cranberry::Scheme::ISO1995 ISO 9 1995 V čaŝah ûga žil by citrus? Da, no fal'šivyj èkzemplǎr!
cranberry::Scheme::ALALC ALA-LC V chashchakh i͡uga zhil by t͡sitrus? Da, no fal'shivyĭ ėkzempli͡ar!

Roadmap

  • Enginges
    • Scientific 1905 (1925)
    • Scientific 1939
    • Scientific 1951-57
    • OST 8483
    • GOST 168876-71
    • ST SEV 1362
    • ISO 9:1995, GOST 7.79-2000
    • GOST 52290-2004
    • GOST 52535.1-2006
    • UNGEGN
    • BS 2979:1958
    • BGN/PCGN
    • Passport 1997
    • Passport 2010
    • Passport 2013 (ICAO)

May be:

  • Bidirectional Support. Latin-to-Cyrillic conversion capabilities.
  • Custom Schemas. User-defined mapping configurations.
  • Standalone Application. Command-line tool, WebAssembly playground or GTK+ GUI.

License

This project is licensed under the MIT License.

No runtime deps