acrophonetic

package module
v0.0.0-...-f2a1e84 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: BSD-2-Clause Imports: 1 Imported by: 0

README

Acrophonetic

GoDoc

Acrophonetic is a library (and command line program) that transribes characters in a string to a spelling representation.

It currently spells:

Status

This library is currently unstable and the API may change.

License

Licensed under the terms of the BSD license. See LICENSE file for more infomation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(t Transcriber)

Register instructes TransRune to use the provided Transcriber.

func RegisterFunc

func RegisterFunc(f func(r rune) string)

RegisterFunc instructs TransRune to use the provided function.

func Spell

func Spell(s string) []string

Spell is a convience method. It converts the provided string to a slice of runes and calls SpellSlice on them.

func SpellSlice

func SpellSlice(r []rune) []string

SpellSlice will return the phonetic representation (if any) for all the provided runes.

func TransRune

func TransRune(c rune) string

TransRune returns acrophonetic representation for the provided rune. It uses the provided Transcriber or the default NATO transcriber. If no representation exists it an empty string will be returned.

Types

type Transcriber

type Transcriber interface {
	TransRune(r rune) string

} //interface

Transcriber translates a rune to a a representation.

func TransFunc

func TransFunc(f func(r rune) string) Transcriber

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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