pinyin

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

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

Go to latest
Published: Oct 15, 2018 License: MIT Imports: 3 Imported by: 0

README

Package pinyin provides functions to convert text between Pinyin diacritic and tone markings, e.g. wo3 <-> wǒ.

Read the docs on godoc.org: http://godoc.org/bitbucket.org/purohit/pinyin

Documentation

Overview

Package pinyin provides functions to convert text between Pinyin diacritic and tone markings, e.g. wo3 <-> wǒ.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToDiacritics

func ConvertToDiacritics(text string) string

ConvertToDiacritics converts any length Pinyin text marked with numerals, to Pinyin marked by diacritics. Tone 5 is an absence of diacritics. Ex. ConvertToDiacritics("wo3 hen3 hao3 a5") // wǒ hěn hǎo a

func ConvertToNumerals

func ConvertToNumerals(text string) string

ConvertToNumerals converts Pinyin text marked with diacritics, to Pinyin marked by numerals. Ex. ConvertToNumerals("wǒ hěn hǎo") // wo3 hen3 hao3

Types

This section is empty.

Jump to

Keyboard shortcuts

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