iuliia-cr v0.1.2

🇷🇺 Cyrillic → Latin transliteration for Crystal

Iuliia

🇷🇺Russian Cyrillic → Latin transliteration for Crystal.

The library includes all main international and Russian transliteration standards. For schema details and other information, see https://github.com/nalgeon/iuliia (schemas ❤️) and https://iuliia.ru (in Russian).

For 🇺🇦Ukrainian Cyrillic transliteration, check out this library instead.

CI

Quickstart

require "iuliia"

Iuliia::Wikipedia.translate("Национальный Технический Университет «Днепровская политехника»")
# 🇷🇺 => "Natsionalny Tekhnichesky Universitet «Dneprovskaya Politekhnika»"

Iuliia::Wikipedia.translate("Фёдор Достоевский")
# 🇷🇺 => "Fyodor Dostoyevsky"

Iuliia::IcaoDoc9303.translate("Фёдор Достоевский")
# 🇷🇺 => "Fedor Dostoevskii"

Performance

Library Throughput
Crystal 544,680 words/sec
Go 591,711 words/sec
Ruby 32,269 words/sec

REPL

In the examples folder you can find a small REPL to play with.

$ crystal examples/repl.cr

[iuliia] >> Московский Кремль
=> Moskovsky Kreml
[iuliia] >> Парк Зарядье
=> Park Zaryadye
[iuliia] >>

Supported schemas

For examples and specifics, please refer to 📚 the documentation.

  • ALA-LC transliteration schema (📚 docs)
  • ALA-LC alternative transliteration schema (📚 docs)
  • BGN/PCGN transliteration schema (📚 docs)
  • BGN/PCGN alternative transliteration schema (📚 docs)
  • British Standard 2979:1958 transliteration schema (📚 docs)
  • British Standard 2979:1958 alternative transliteration schema (📚 docs)
  • GOST 16876-71 (aka GOST 1983) transliteration schema (📚 docs)
  • GOST 16876-71 (aka GOST 1983) alternative transliteration schema (📚 docs)
  • GOST R 52290-2004 transliteration schema (📚 docs)
  • GOST R 52535.1-2006 transliteration schema (📚 docs)
  • GOST R 7.0.34-2014 transliteration schema (📚 docs)
  • GOST 7.79-2000 (aka ISO 9:1995) transliteration schema (📚 docs)
  • GOST 7.79-2000 (aka ISO 9:1995) alternative transliteration schema (📚 docs)
  • ICAO DOC 9303 transliteration schema (📚 docs)
  • ISO/R 9:1954 transliteration schema (📚 docs)
  • ISO/R 9:1968 transliteration schema (📚 docs)
  • ISO/R 9:1968 alternative transliteration schema (📚 docs)
  • Moscow Metro map transliteration schema (📚 docs)
  • MVD 310-1997 transliteration schema (📚 docs)
  • MVD 310-1997 french transliteration schema (📚 docs)
  • MVD 782-2000 transliteration schema (📚 docs)
  • Scientific transliteration schema (📚 docs)
  • Telegram transliteration schema (📚 docs)
  • UNGEGN 1988 V/18 transliteration schema (📚 docs)
  • Wikipedia transliteration schema (📚 docs)
  • Yandex.Maps transliteration schema (📚 docs)
  • Yandex.Money transliteration schema (📚 docs)

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      iuliia:
        github: lucasintel/iuliia
    
  2. Run shards install

Development

To import Iuliia schemas, run crystal schema_importer/importer.cr.

Contributing

  1. Fork it (https://github.com/lucasintel/iuliia-cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

iuliia-cr

Owner
Statistic
  • 4
  • 1
  • 0
  • 0
  • 0
  • over 1 year ago
  • January 9, 2022
License

MIT License

Links
Synced at

Wed, 15 May 2024 23:47:40 GMT

Languages