iuliia

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 5 Imported by: 7

README

Iuliia

Transliterate Cyrillic → Latin in every possible way

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

GoDoc Go codecov Go Report

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 iuliia "github.com/mehanizm/iuliia-go"

func main() {
    translated := iuliia.Wikipedia.Translate("Юлия Щеглова")
    fmt.Println(translated)
}

>> 'Yuliya Shcheglova'

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

go get github.com/mehanizm/iuliia-go

schemas folder is the git submodule from general repository. You can add schemes manually and use generation to generate all code and tests:

go generate

CLI interface

In the folder cmd you can find CLI app to play with the transliteration.

# run the app with help
./iuliia -h
> Usage of ./iuliia:
>   -schema string
>         choose schema name (default "wikipedia")
>   -show
>         showing list of the schemas

# simple run the program
./iuliia
> type phrase to translate with schema wikipedia:
> 'quit' to exit or 'help' to get help
> > 

# show help
> help
>> * show - to show all schemas
>> * change schema_name - to change schema
>> * quit - to quit the program
>> type phrase to translate with schema wikipedia:
>> 'quit' to exit or 'help' to get help

# translate
> Привет. Как у тебя дела?
>> Privet. Kak u tebya dela?

# show all schemas
> show
>> ala_lc:              ALA-LC transliteration schema.
>> ala_lc_alt:          ALA-LC transliteration schema.
>> bgn_pcgn:            BGN/PCGN transliteration schema
>> bgn_pcgn_alt:        BGN/PCGN transliteration schema
>> bs_2979:             British Standard 2979:1958 transliteration schema
>> bs_2979_alt:         British Standard 2979:1958 transliteration schema
>> gost_16876:          GOST 16876-71 (aka GOST 1983) transliteration schema
>> gost_16876_alt:      GOST 16876-71 (aka GOST 1983) transliteration schema
>> gost_52290:          GOST R 52290-2004 transliteration schema
>> gost_52535:          GOST R 52535.1-2006 transliteration schema
>> gost_7034:           GOST R 7.0.34-2014 transliteration schema
>> gost_779:            GOST 7.79-2000 (aka ISO 9:1995) transliteration schema
>> gost_779_alt:        GOST 7.79-2000 (aka ISO 9:1995) transliteration schema
>> icao_doc_9303:       ICAO DOC 9303 transliteration schema
>> iso_9_1954:          ISO/R 9:1954 transliteration schema
>> iso_9_1968:          ISO/R 9:1968 transliteration schema
>> iso_9_1968_alt:      ISO/R 9:1968 transliteration schema
>> mosmetro:            Moscow Metro map transliteration schema
>> mvd_310:             MVD 310-1997 transliteration schema
>> mvd_310_fr:          MVD 310-1997 transliteration schema
>> mvd_782:             MVD 782-2000 transliteration schema
>> scientific:          Scientific transliteration schema
>> telegram:            Telegram transliteration schema
>> ungegn_1987:         UNGEGN 1987 V/18 transliteration schema
>> wikipedia:           Wikipedia transliteration schema
>> yandex_maps:         Yandex.Maps transliteration schema
>> yandex_money:        Yandex.Money transliteration schema

# change schema
> change telegram
>> schema was changed to telegram
>> 
>> type phrase to translate with schema telegram:
>> 'quit' to exit or 'help' to get help

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

Documentation

Overview

Package iuliia main Copyright © 2020 Mike Berezin

Use of this source code is governed by an MIT license. Details in the LICENSE file.

Package iuliia do not edit, generated file

Index

Constants

This section is empty.

Variables

View Source
var Ala_lc = &Schema{
	Name: "ala_lc",
	Desc: "ALA-LC transliteration schema.",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "ĭ",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "t͡s",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "ʺ",
		"ы": "y",
		"ь": "ʹ",
		"э": "ė",
		"ю": "i͡u",
		"я": "i͡a",
		"ё": "ё",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

ALA-LC transliteration schema. https://dangry.ru/iuliia/ala-lc/

View Source
var Ala_lc_alt = &Schema{
	Name: "ala_lc_alt",
	Desc: "ALA-LC transliteration schema.",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "i",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "\"",
		"ы": "y",
		"ь": "'",
		"э": "e",
		"ю": "iu",
		"я": "ia",
		"ё": "e",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

ALA-LC transliteration schema. https://dangry.ru/iuliia/ala-lc/

View Source
var Bgn_pcgn = &Schema{
	Name: "bgn_pcgn",
	Desc: "BGN/PCGN transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "y",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "”",
		"ы": "y",
		"ь": "’",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "ё",
	},
	PrevMapping: map[string]string{
		"ае": "ye",
		"аы": "·y",
		"аё": "yё",
		"бэ": "·e",
		"вэ": "·e",
		"гэ": "·e",
		"дэ": "·e",
		"е":  "ye",
		"ее": "ye",
		"еы": "·y",
		"её": "yё",
		"жэ": "·e",
		"зэ": "·e",
		"ие": "ye",
		"иы": "·y",
		"иё": "yё",
		"йе": "ye",
		"йё": "yё",
		"кэ": "·e",
		"лэ": "·e",
		"мэ": "·e",
		"нэ": "·e",
		"ое": "ye",
		"оы": "·y",
		"оё": "yё",
		"пэ": "·e",
		"рэ": "·e",
		"сэ": "·e",
		"тэ": "·e",
		"уе": "ye",
		"уы": "·y",
		"уё": "yё",
		"фэ": "·e",
		"хэ": "·e",
		"цэ": "·e",
		"чэ": "·e",
		"шэ": "·e",
		"щэ": "·e",
		"ъе": "ye",
		"ъё": "yё",
		"ые": "ye",
		"ыы": "·y",
		"ыё": "yё",
		"ье": "ye",
		"ьё": "yё",
		"эе": "ye",
		"эы": "·y",
		"эё": "yё",
		"юе": "ye",
		"юы": "·y",
		"юё": "yё",
		"яе": "ye",
		"яы": "·y",
		"яё": "yё",
		"ё":  "yё",
		"ёе": "ye",
		"ёы": "·y",
		"ёё": "yё",
	},
	NextMapping: map[string]string{
		"йа": "y·",
		"йу": "y·",
		"йы": "y·",
		"йэ": "y·",
		"тс": "t·",
		"шч": "sh·",
		"ыа": "y·",
		"ыу": "y·",
		"ыы": "y·",
		"ыэ": "y·",
	},
	EndingMapping: map[string]string{},
}

BGN/PCGN transliteration schema https://dangry.ru/iuliia/bgn-pcgn/

View Source
var Bgn_pcgn_alt = &Schema{
	Name: "bgn_pcgn_alt",
	Desc: "BGN/PCGN transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "y",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "”",
		"ы": "y",
		"ь": "’",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "ё",
	},
	PrevMapping: map[string]string{
		"ае": "ye",
		"аё": "yё",
		"е":  "ye",
		"ее": "ye",
		"её": "yё",
		"ие": "ye",
		"иё": "yё",
		"йе": "ye",
		"йё": "yё",
		"ое": "ye",
		"оё": "yё",
		"уе": "ye",
		"уё": "yё",
		"ъе": "ye",
		"ъё": "yё",
		"ые": "ye",
		"ыё": "yё",
		"ье": "ye",
		"ьё": "yё",
		"эе": "ye",
		"эё": "yё",
		"юе": "ye",
		"юё": "yё",
		"яе": "ye",
		"яё": "yё",
		"ё":  "yё",
		"ёе": "ye",
		"ёё": "yё",
	},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

BGN/PCGN transliteration schema https://dangry.ru/iuliia/bgn-pcgn/

View Source
var Bs_2979 = &Schema{
	Name: "bs_2979",
	Desc: "British Standard 2979:1958 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "ĭ",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "ʺ",
		"ы": "ȳ",
		"ь": "ʹ",
		"э": "é",
		"ю": "yu",
		"я": "ya",
		"ё": "ё",
	},
	PrevMapping: map[string]string{},
	NextMapping: map[string]string{},
	EndingMapping: map[string]string{
		"ий": "y",
		"ый": "y",
	},
}

British Standard 2979:1958 transliteration schema https://dangry.ru/iuliia/bs-2979/

View Source
var Bs_2979_alt = &Schema{
	Name: "bs_2979_alt",
	Desc: "British Standard 2979:1958 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "i",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "\"",
		"ы": "y",
		"ь": "'",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "e",
	},
	PrevMapping: map[string]string{},
	NextMapping: map[string]string{},
	EndingMapping: map[string]string{
		"ий": "y",
		"ый": "y",
	},
}

British Standard 2979:1958 transliteration schema https://dangry.ru/iuliia/bs-2979/

View Source
var Gost_16876 = &Schema{
	Name: "gost_16876",
	Desc: "GOST 16876-71 (aka GOST 1983) transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "ž",
		"з": "z",
		"и": "i",
		"й": "j",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "h",
		"ц": "c",
		"ч": "č",
		"ш": "š",
		"щ": "ŝ",
		"ъ": "ʺ",
		"ы": "y",
		"ь": "ʹ",
		"э": "è",
		"ю": "û",
		"я": "â",
		"ё": "ё",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

GOST 16876-71 (aka GOST 1983) transliteration schema https://dangry.ru/iuliia/gost-16876/

View Source
var Gost_16876_alt = &Schema{
	Name: "gost_16876_alt",
	Desc: "GOST 16876-71 (aka GOST 1983) transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "jj",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "c",
		"ч": "ch",
		"ш": "sh",
		"щ": "shh",
		"ъ": "\"",
		"ы": "y",
		"ь": "'",
		"э": "eh",
		"ю": "ju",
		"я": "ja",
		"ё": "jo",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

GOST 16876-71 (aka GOST 1983) transliteration schema https://dangry.ru/iuliia/gost-16876/

View Source
var Gost_52290 = &Schema{
	Name: "gost_52290",
	Desc: "GOST R 52290-2004 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "y",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "'",
		"ы": "y",
		"ь": "'",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "yo",
	},
	PrevMapping: map[string]string{
		"ае": "ye",
		"бё": "ye",
		"вё": "ye",
		"гё": "ye",
		"дё": "ye",
		"ее": "ye",
		"жё": "e",
		"зё": "ye",
		"ие": "ye",
		"кё": "ye",
		"лё": "ye",
		"мё": "ye",
		"нё": "ye",
		"ое": "ye",
		"пё": "ye",
		"рё": "ye",
		"сё": "ye",
		"тё": "ye",
		"уе": "ye",
		"фё": "ye",
		"хё": "ye",
		"цё": "ye",
		"чё": "e",
		"шё": "e",
		"щё": "e",
		"ъе": "ye",
		"ые": "ye",
		"ье": "ye",
		"эе": "ye",
		"юе": "ye",
		"яе": "ye",
		"ёе": "ye",
	},
	NextMapping: map[string]string{
		"ъе": "",
		"ъё": "",
		"ье": "",
		"ьё": "",
	},
	EndingMapping: map[string]string{},
}

GOST R 52290-2004 transliteration schema https://dangry.ru/iuliia/gost-52290/

View Source
var Gost_52535 = &Schema{
	Name: "gost_52535",
	Desc: "GOST R 52535.1-2006 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "i",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "tc",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "",
		"ы": "y",
		"ь": "",
		"э": "e",
		"ю": "iu",
		"я": "ia",
		"ё": "e",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

GOST R 52535.1-2006 transliteration schema http://localhost:3000/iuliia/gost-52535/

View Source
var Gost_7034 = &Schema{
	Name: "gost_7034",
	Desc: "GOST R 7.0.34-2014 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "j",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "x",
		"ц": "c",
		"ч": "ch",
		"ш": "sh",
		"щ": "shh",
		"ъ": "''",
		"ы": "y",
		"ь": "'",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "yo",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

GOST R 7.0.34-2014 transliteration schema http://localhost:3000/iuliia/gost-7034/

View Source
var Gost_779 = &Schema{
	Name: "gost_779",
	Desc: "GOST 7.79-2000 (aka ISO 9:1995) transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "ž",
		"з": "z",
		"и": "i",
		"й": "j",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "h",
		"ц": "c",
		"ч": "č",
		"ш": "š",
		"щ": "ŝ",
		"ъ": "ʺ",
		"ы": "y",
		"ь": "ʹ",
		"э": "è",
		"ю": "û",
		"я": "â",
		"ё": "ё",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

GOST 7.79-2000 (aka ISO 9:1995) transliteration schema https://dangry.ru/iuliia/gost-779/

View Source
var Gost_779_alt = &Schema{
	Name: "gost_779_alt",
	Desc: "GOST 7.79-2000 (aka ISO 9:1995) transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "j",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "x",
		"ц": "cz",
		"ч": "ch",
		"ш": "sh",
		"щ": "shh",
		"ъ": "``",
		"ы": "y`",
		"ь": "`",
		"э": "е`",
		"ю": "yu",
		"я": "ya",
		"ё": "yo",
	},
	PrevMapping: map[string]string{},
	NextMapping: map[string]string{
		"це": "c",
		"ци": "c",
		"цй": "c",
		"цы": "c",
	},
	EndingMapping: map[string]string{},
}

GOST 7.79-2000 (aka ISO 9:1995) transliteration schema https://dangry.ru/iuliia/gost-779/

View Source
var Icao_doc_9303 = &Schema{
	Name: "icao_doc_9303",
	Desc: "ICAO DOC 9303 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "i",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "ie",
		"ы": "y",
		"ь": "",
		"э": "e",
		"ю": "iu",
		"я": "ia",
		"ё": "e",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

ICAO DOC 9303 transliteration schema https://dangry.ru/iuliia/icao-doc-9303/

View Source
var Iso_9_1954 = &Schema{
	Name: "iso_9_1954",
	Desc: "ISO/R 9:1954 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "ž",
		"з": "z",
		"и": "i",
		"й": "j",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "h",
		"ц": "c",
		"ч": "č",
		"ш": "š",
		"щ": "šč",
		"ъ": "\"",
		"ы": "y",
		"ь": "ʹ",
		"э": "ė",
		"ю": "ju",
		"я": "ja",
		"ё": "ë",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

ISO/R 9:1954 transliteration schema https://dangry.ru/iuliia/iso-9-1954/

View Source
var Iso_9_1968 = &Schema{
	Name: "iso_9_1968",
	Desc: "ISO/R 9:1968 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "ž",
		"з": "z",
		"и": "i",
		"й": "j",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "h",
		"ц": "c",
		"ч": "č",
		"ш": "š",
		"щ": "šč",
		"ъ": "ʺ",
		"ы": "y",
		"ь": "ʹ",
		"э": "ė",
		"ю": "ju",
		"я": "ja",
		"ё": "ë",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

ISO/R 9:1968 transliteration schema https://dangry.ru/iuliia/iso-9-1968/

View Source
var Iso_9_1968_alt = &Schema{
	Name: "iso_9_1968_alt",
	Desc: "ISO/R 9:1968 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "y",
		"й": "ĭ",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "ʺ",
		"ы": "y",
		"ь": "ʹ",
		"э": "ė",
		"ю": "yu",
		"я": "ya",
		"ё": "ë",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

ISO/R 9:1968 transliteration schema https://dangry.ru/iuliia/iso-9-1968/

View Source
var Mosmetro = &Schema{
	Name: "mosmetro",
	Desc: "Moscow Metro map transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "y",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "sch",
		"ъ": "",
		"ы": "y",
		"ь": "",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "e",
	},
	PrevMapping: map[string]string{
		"тц": "s",
		"ъё": "o",
		"ьё": "o",
	},
	NextMapping: map[string]string{
		"ъа": "y",
		"ъе": "y",
		"ъи": "y",
		"ъо": "y",
		"ъу": "y",
		"ъэ": "y",
		"ъё": "y",
		"ьа": "y",
		"ье": "y",
		"ьи": "y",
		"ьо": "y",
		"ьу": "y",
		"ьэ": "y",
		"ьё": "y",
	},
	EndingMapping: map[string]string{
		"ий": "y",
		"ый": "y",
	},
}

Moscow Metro map transliteration schema https://dangry.ru/iuliia/mosmetro/

View Source
var Mvd_310 = &Schema{
	Name: "mvd_310",
	Desc: "MVD 310-1997 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "y",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "\"",
		"ы": "y",
		"ь": "'",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "e",
	},
	PrevMapping: map[string]string{
		"ъе": "ye",
		"ье": "ye",
	},
	NextMapping: map[string]string{
		"ъе": "",
		"ье": "",
	},
	EndingMapping: map[string]string{},
}

MVD 310-1997 transliteration schema https://dangry.ru/iuliia/mvd-310/

View Source
var Mvd_310_fr = &Schema{
	Name: "mvd_310_fr",
	Desc: "MVD 310-1997 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "j",
		"з": "z",
		"и": "i",
		"й": "i",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "ou",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "tch",
		"ш": "ch",
		"щ": "chtch",
		"ъ": "",
		"ы": "y",
		"ь": "",
		"э": "e",
		"ю": "iou",
		"я": "ia",
		"ё": "e",
	},
	PrevMapping: map[string]string{
		"ге": "ue",
		"ги": "ui",
		"гы": "uy",
		"кс": "x",
		"ье": "ie",
	},
	NextMapping: map[string]string{
		"кс": "",
	},
	EndingMapping: map[string]string{
		"ин": "ine",
	},
}

MVD 310-1997 transliteration schema https://dangry.ru/iuliia/mvd-310/

View Source
var Mvd_782 = &Schema{
	Name: "mvd_782",
	Desc: "MVD 782-2000 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "y",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "'",
		"ы": "y",
		"ь": "'",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "yo",
	},
	PrevMapping: map[string]string{
		"ае": "ye",
		"бё": "ye",
		"вё": "ye",
		"гё": "ye",
		"дё": "ye",
		"ее": "ye",
		"жё": "e",
		"зё": "ye",
		"ие": "ye",
		"кё": "ye",
		"лё": "ye",
		"мё": "ye",
		"нё": "ye",
		"ое": "ye",
		"пё": "ye",
		"рё": "ye",
		"сё": "ye",
		"тё": "ye",
		"уе": "ye",
		"фё": "ye",
		"хё": "ye",
		"цё": "ye",
		"чё": "e",
		"шё": "e",
		"щё": "e",
		"ъе": "ye",
		"ые": "ye",
		"ье": "ye",
		"ьи": "yi",
		"эе": "ye",
		"юе": "ye",
		"яе": "ye",
		"ёе": "ye",
	},
	NextMapping: map[string]string{
		"ъе": "",
		"ъё": "",
		"ье": "",
		"ьи": "",
		"ьё": "",
	},
	EndingMapping: map[string]string{},
}

MVD 782-2000 transliteration schema https://dangry.ru/iuliia/mvd-782/

View Source
var SchemaMapping = map[string]*Schema{
	"ala_lc":         Ala_lc,
	"ala_lc_alt":     Ala_lc_alt,
	"bgn_pcgn":       Bgn_pcgn,
	"bgn_pcgn_alt":   Bgn_pcgn_alt,
	"bs_2979":        Bs_2979,
	"bs_2979_alt":    Bs_2979_alt,
	"gost_16876":     Gost_16876,
	"gost_16876_alt": Gost_16876_alt,
	"gost_52290":     Gost_52290,
	"gost_52535":     Gost_52535,
	"gost_7034":      Gost_7034,
	"gost_779":       Gost_779,
	"gost_779_alt":   Gost_779_alt,
	"icao_doc_9303":  Icao_doc_9303,
	"iso_9_1954":     Iso_9_1954,
	"iso_9_1968":     Iso_9_1968,
	"iso_9_1968_alt": Iso_9_1968_alt,
	"mosmetro":       Mosmetro,
	"mvd_310":        Mvd_310,
	"mvd_310_fr":     Mvd_310_fr,
	"mvd_782":        Mvd_782,
	"scientific":     Scientific,
	"telegram":       Telegram,
	"ungegn_1987":    Ungegn_1987,
	"wikipedia":      Wikipedia,
	"yandex_maps":    Yandex_maps,
	"yandex_money":   Yandex_money,
}

SchemaMapping mapping of all schemas

View Source
var Scientific = &Schema{
	Name: "scientific",
	Desc: "Scientific transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "ž",
		"з": "z",
		"и": "i",
		"й": "j",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "x",
		"ц": "c",
		"ч": "č",
		"ш": "š",
		"щ": "šč",
		"ъ": "ʺ",
		"ы": "y",
		"ь": "ʹ",
		"э": "è",
		"ю": "ju",
		"я": "ja",
		"ё": "ё",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

Scientific transliteration schema https://dangry.ru/iuliia/scientific/

View Source
var Telegram = &Schema{
	Name: "telegram",
	Desc: "Telegram transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "j",
		"з": "z",
		"и": "i",
		"й": "i",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "h",
		"ц": "c",
		"ч": "ch",
		"ш": "sh",
		"щ": "sc",
		"ъ": "",
		"ы": "y",
		"ь": "",
		"э": "e",
		"ю": "iu",
		"я": "ia",
		"ё": "e",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

Telegram transliteration schema https://dangry.ru/iuliia/telegram/

View Source
var Ungegn_1987 = &Schema{
	Name: "ungegn_1987",
	Desc: "UNGEGN 1987 V/18 transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "ž",
		"з": "z",
		"и": "i",
		"й": "j",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "h",
		"ц": "c",
		"ч": "č",
		"ш": "š",
		"щ": "šč",
		"ъ": "ʺ",
		"ы": "y",
		"ь": "ʹ",
		"э": "è",
		"ю": "ju",
		"я": "ja",
		"ё": "ё",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

UNGEGN 1987 V/18 transliteration schema https://dangry.ru/iuliia/ungegn-1987/

View Source
var Wikipedia = &Schema{
	Name: "wikipedia",
	Desc: "Wikipedia transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "y",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "shch",
		"ъ": "",
		"ы": "y",
		"ь": "",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "yo",
	},
	PrevMapping: map[string]string{
		"ае": "ye",
		"е":  "ye",
		"ие": "ye",
		"ое": "ye",
		"уе": "ye",
		"ъе": "ye",
		"ье": "ye",
		"эе": "ye",
		"юе": "ye",
		"яе": "ye",
	},
	NextMapping: map[string]string{
		"ъа": "y",
		"ъи": "y",
		"ъо": "y",
		"ъу": "y",
		"ъы": "y",
		"ъэ": "y",
		"ьа": "y",
		"ьи": "y",
		"ьо": "y",
		"ьу": "y",
		"ьы": "y",
		"ьэ": "y",
	},
	EndingMapping: map[string]string{
		"ий": "y",
		"ый": "y",
	},
}

Wikipedia transliteration schema https://dangry.ru/iuliia/wikipedia/

View Source
var Yandex_maps = &Schema{
	Name: "yandex_maps",
	Desc: "Yandex.Maps transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "y",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "sch",
		"ъ": "",
		"ы": "y",
		"ь": "",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "yo",
	},
	PrevMapping: map[string]string{},
	NextMapping: map[string]string{
		"ъе": "y",
	},
	EndingMapping: map[string]string{
		"ый": "iy",
	},
}

Yandex.Maps transliteration schema https://dangry.ru/iuliia/yandex-maps/

View Source
var Yandex_money = &Schema{
	Name: "yandex_money",
	Desc: "Yandex.Money transliteration schema",
	Mapping: map[string]string{
		"а": "a",
		"б": "b",
		"в": "v",
		"г": "g",
		"д": "d",
		"е": "e",
		"ж": "zh",
		"з": "z",
		"и": "i",
		"й": "i",
		"к": "k",
		"л": "l",
		"м": "m",
		"н": "n",
		"о": "o",
		"п": "p",
		"р": "r",
		"с": "s",
		"т": "t",
		"у": "u",
		"ф": "f",
		"х": "kh",
		"ц": "ts",
		"ч": "ch",
		"ш": "sh",
		"щ": "sch",
		"ъ": "",
		"ы": "y",
		"ь": "",
		"э": "e",
		"ю": "yu",
		"я": "ya",
		"ё": "e",
	},
	PrevMapping:   map[string]string{},
	NextMapping:   map[string]string{},
	EndingMapping: map[string]string{},
}

Yandex.Money transliteration schema https://dangry.ru/iuliia/yandex-money/

Functions

func SchemaPrinter

func SchemaPrinter(schemas map[string]*Schema) string

SchemaPrinter prints schemas line by line

Types

type Schema

type Schema struct {
	Name          string            `json:"name"`
	Desc          string            `json:"description"`
	URL           string            `json:"url"`
	Mapping       map[string]string `json:"mapping"`
	PrevMapping   map[string]string `json:"prev_mapping"`
	NextMapping   map[string]string `json:"next_mapping"`
	EndingMapping map[string]string `json:"ending_mapping"`
	Samples       [][]string        `json:"samples"`
	// contains filtered or unexported fields
}

Schema base Schema struct

func (*Schema) Translate

func (s *Schema) Translate(source string) string

Translate translates input strings with schema return error if any of the word was translated with error

Directories

Path Synopsis
go build -o iuliia
go build -o iuliia

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL