Skip to content

Cyrillic to Latin converter: Belarusian, Russian, Ukrainian -> English, German or scientific transliteration

License

Notifications You must be signed in to change notification settings

dekoder-org/transkribator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transkribator

Cyrillic to Latin converter. Takes Belarusian, Russian and Ukranian text and outputs its representation in German, English or scientific transliteration.

See our live demo at dekoder.org.

Transkribator Example Image

Install

npm install transkribator

Usage

import { transcribe } from "transkribator"

transcribe("Грушевський Михайло Сергійович", { from: "uk", to: "en" })
// returns "Hrushevskyi Mykhailo Serhiiovych"

Or in the browser:

<script src="https://unpkg.com/transkribator"></script>
<script>
  const { transcribe } = transkribator
  transcribe("Валянцін Акудовіч", { from: "be", to: "scientific" })
  // returns "Valjancin Akudovič"
</script>

Options

The transcribe function accepts an object with the following optional settings as a second argument:

property default value description
from "ru" ISO-Code of the source language (can be "be", "ru" or "uk")
to "en" ISO-Code of the target language (can be "de", "en" or "scientific")
showDetails false if set to true the function returns an object with more detailed information about the applied rules (see below).

Transcription/transliteration standards

The German transcription rules are based on the Duden recommendations.

Ukrainian to English is converted according to the official Ukrainian passport transliteration. (See cyrillic-to-translit-js for another implementation).

For scientific transliterations checkout this handout from the Slavic Department of the University of Cologne.

Advanced usage

Learn more about the applied rules with the showDetails option:

const result = transcribe("М. Сергійович Грушевський", { from: "uk", to "de", showDetails: true })
const { output, appliedRules } = result
console.log(output)
// "M. Serhijowytsch Hruschewsky"

for (const rule of appliedRules) {
  const { description, word, affectedLetters } = rule
  console.log(`– ${description} (${word})`)
}
// – й -> j zwischen zwei Vokalen (Сергійович)
// – й nicht wiedergegeben nach и (Грушевський)

About

Cyrillic to Latin converter: Belarusian, Russian, Ukrainian -> English, German or scientific transliteration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published