translit

package module
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 1 Imported by: 27

README

PkgGoDev GoReportCard GitHub Actions CodeQL Status GoReportCard Codebeat badge Coverage Status

InstallationBuild StatusLicense


translit is a Go package for Russian text transliteration.

Supported output formats:

  • Scientific
  • ISO 9:1995/A ГОСТ 7.79-2000/A
  • ISO 9:1995/B ГОСТ 7.79-2000/Б
  • BGN/PCGN
  • ALA-LC
  • BS 2979:1958
  • ICAO

Installation

Make sure you have a working Go 1.15+ workspace (instructions), then:

go get pkg.re/essentialkaos/translit.v2

For update to latest stable release, do:

go get -u pkg.re/essentialkaos/translit.v2

Build Status

Branch Status
master CI
develop CI

License

Apache License, Version 2.0

Documentation

Overview

Package translit convert russian text to translit

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeToALALC

func EncodeToALALC(text string) string

EncodeToALALC encodes text with ALA-LC mappings

Example
fmt.Println(EncodeToALALC(source))
Output:

Shirokai͡a ėlektrifikat͡sii͡a i͡uzhnykh guberniĭ dast moshchnyĭ tolchok pod″ëmu sel′skogo khozi͡aĭstva.

func EncodeToBGN

func EncodeToBGN(text string) string

EncodeToBGN encodes text with BGN mappings

Example
fmt.Println(EncodeToBGN(source))
Output:

Shirokaya elektrifikatsiya yuzhnykh guberniy dast moshchnyy tolchok pod″ëmu sel′skogo khozyaystva.

func EncodeToBS

func EncodeToBS(text string) string

EncodeToBS encodes text with BS 2979:1958 mappings

Example
fmt.Println(EncodeToBS(source))
Output:

Shirokai͡a ėlektrifikat͡sii͡a i͡uzhnykh guberniĭ dast moshchnyĭ tolchok pod″ëmu sel′skogo khozi͡aĭstva.

func EncodeToICAO

func EncodeToICAO(text string) string

EncodeToBS encodes text with ICAO mappings

Example
fmt.Println(EncodeToICAO(source))
Output:

Shirokaia elektrifikatsiia iuzhnykh gubernii dast moshchnyi tolchok podieemu selskogo khoziaistva.

func EncodeToISO9A

func EncodeToISO9A(text string) string

EncodeToISO9A encodes text with ISO 9:1995/A ГОСТ 7.79-2000/A mappings

Example
fmt.Println(EncodeToISO9A(source))
Output:

Širokaâ èlektrifikaciâ ûžnyh gubernij dast moŝnyj tolčok pod″ëmu sel′skogo hozâjstva.

func EncodeToISO9B

func EncodeToISO9B(text string) string

EncodeToISO9B encodes text with ISO 9:1995/B ГОСТ 7.79-2000/Б mappings

Example
fmt.Println(EncodeToISO9B(source))
Output:

Shirokaya e`lektrifikaсiya yuzhny`x gubernij dast moshhny`j tolchok pod``yomu sel`skogo xozyajstva.

func EncodeToPCGN

func EncodeToPCGN(text string) string

EncodeToPCGN encodes text with PCGN mappings

Example
fmt.Println(EncodeToPCGN(source))
Output:

Shirokaya elektrifikatsiya yuzhnykh guberniy dast moshchnyy tolchok pod″ëmu sel′skogo khozyaystva.

func EncodeToScientific

func EncodeToScientific(text string) string

EncodeToScientific encodes text with scientific mappings

Example
fmt.Println(EncodeToScientific(source))
Output:

Širokaja èlektrifikacija južnych gubernij dast moščnyj tolčok pod″ëmu sel′skogo chozjajstva.

Types

This section is empty.

Jump to

Keyboard shortcuts

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