Git Product home page Git Product logo

iuliia-java's Introduction

Iuliia

Transliterate Cyrillic → Latin in every possible way

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.

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.

For schema details and other information, see https://dangry.ru/iuliia (in Russian).

Installation

Maven dependency

<!-- https://mvnrepository.com/artifact/ru.homyakin/iuliia-java -->
<dependency>
    <groupId>ru.homyakin</groupId>
    <artifactId>iuliia-java</artifactId>
    <version>1.8</version>
</dependency>

Gradle

implementation 'ru.homyakin:iuliia-java:1.8'

Usage (Java 11 and higher)

Transliterate using specified schema:

import ru.homyakin.iuliia.Schemas;
import ru.homyakin.iuliia.Translator;

public class Clazz {
    public static void test() {        
        var translator = new Translator(Schemas.ICAO_DOC_9303);
        translator.translate("Юлия"); //Iuliia
    }
}

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

iuliia-java's People

Contributors

dependabot[bot] avatar homyakin avatar nalgeon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

iuliia-java's Issues

Is JavaFX dependency really needed?

Do you really need a whole JavaFX packgage («fully featured toolkit for developing rich client applications») just to use a single Pair class from it? Especially considering that iuliia has nothing to do with UI.

Latin transcriptions should not use cyrillic characters

Currently, some schemas map ё (U+0451, Cyrillic io) to itself. This mapping should be replaced by ë (U+00EB, Latin e with diaeresis).

Use case:

  • We use Translator to transcribe Russian names, and then further normalize the results by removing diacritics and non-alphabetic characters to store the names in a search index.
  • The search index is expected to contain ASCII characters only, but now contains е (U+0435, Cyrillic ie).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.