translit

package module
v0.0.0-...-5a73aa9 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 12 Imported by: 0

README

translit

GoDoc Go Report Card Github actions workflow status

A collection of utilities for transliterating non-Latin scripts into Latin (and reverse, where applicable).

Installation

  1. Set up go

    Download: https://golang.org/dl/ (1.13 or higher)
    Installation instructions: https://golang.org/doc/install

  2. Clone the source code

    $ git clone https://github.com/stts-se/translit.git
    $ cd translit

  3. Test (optional)

    translit$ go test ./...

  4. Pre-compile binaries

    translit$ go install ./...


Language versions

Arabic Buckwalter

translit$ buckwalter <arabic text>

References:

Farsi

EI (2012)

translit$ far2lat <farsi text>

References:

Greek

Simplified version of ALA-LC [3]

translit$ grc2lat <greek text>

References:

Russian

A simplified version of the 'Road signs' system.

For Swedish style transliteration, we are using a simplified version TT's recommendations (link below).

translit$ rus2lat <russian text>

References:

Tamil

ISO 15919

translit$ tamil2lat <tamil text>

References:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFile

func IsFile(fName string) bool

func NFC

func NFC(s string) string

NFC convert string

func ReadFile

func ReadFile(fn string) ([]string, error)

func SortKeysByFreq

func SortKeysByFreq(m map[string]int) []string

func StringsContains

func StringsContains(slice []string, elem string) bool

func Upcase

func Upcase(s string) string

Upcase string

func UpcaseInitial

func UpcaseInitial(s string) string

UpcaseInitial upcase first character, downcase the rest

func UpcaseInitials

func UpcaseInitials(s string) []string

UpcaseInitials generate all variations upcasing a first group of characters, downcasing the rest

Types

type UnicodeChar

type UnicodeChar struct {
	Char, Name, Code, Block string
}

func UnicodeInfo

func UnicodeInfo(s string) []UnicodeChar

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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