Skip to content

Transliterate Cyrillic → Latin in every possible way

License

Notifications You must be signed in to change notification settings

massita99/iuliia-java

Repository files navigation

Build Status codecov Maven Central

Iuliia

Transliterate Cyrillic → Latin in every possible way

This is the port of the incredible python library iuliia made by @nalgeon

Transliteration means representing Cyrillic data (mainly names and geographic locations) with Latin letters. It is used for international passports, visas, green cards, driving licenses, mail and goods delivery etc.

Iuliia makes transliteration as easy as:

import io.github.massita99.Iuliia;
import io.github.massita99.Schemas;

public class Application {

    public static void main(String[] args) {
        System.out.println(Iulia.translate("Юлия", Schemas.forName("yandex_maps")));
        //OR:
        System.out.println(Iulia.translate("Юлия", Schemas.AllSchemas.YANDEX_MAPS));

    }
}

>> Yuliya

Why use Iuliia

  • 20 transliteration schemas (rule sets), including all main international and Russian standards.
  • Correctly implements not only the base mapping, but all the special rules for letter combinations and word endings (AFAIK, Iuliia is the only library which does so).
  • Simple API and zero third-party dependencies.

Installation

Gradle:

dependencies {
  implementation 'io.github.massita99:iuliia-java:0.2'
}

Maven:

<dependency>
  <groupId>io.github.massita99</groupId>
  <artifactId>iuliia-java</artifactId>
  <version>0.2</version>
</dependency>

schemas folder is the git submodule from general repository.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Make sure to add or update tests as appropriate.

License

MIT

About

Transliterate Cyrillic → Latin in every possible way

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published