persian

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

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

Go to latest
Published: Oct 9, 2021 License: MIT Imports: 2 Imported by: 0

README

Persian Language Tools for Go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Aleph          = Consonant("a")
	AlephWithMadda = Consonant("a")
)

Functions

func DefaultProcessor

func DefaultProcessor(l *lexer) string

func IsDiacritic

func IsDiacritic(r rune) bool

IsDiacritic returns true if the provided rune is a diacritic in Persian

func ToFinglish

func ToFinglish(input string) string

ToFinglish performs transliteration of the provided string from Persian to English

Types

type Diacritic

type Diacritic rune

Diacritic defines a diacritic character in Persian unicode

const (
	Fatha  Diacritic = 0x064E // Vowel point for long a
	Damma  Diacritic = 0x064F // In the Arabic script, the vowel point for u, appearing as a small curl placed above a letter ( ـُ ) and designating a short u /u/. If the Arabic letter و‎ (wāw) immediately follows, it indicates a long ū /uː/
	Kasra  Diacritic = 0x0650 // In Persian represents the vowel /e/ and is only used in front of ـی‎ to represent a diphthong, so unmarked دی‎ is /di/ but دِی‎ with the diacritic is /dej/. This usage is different from Arabic.
	Shadda Diacritic = 0x0651 // Doubles the prior consonant
	Sukun  Diacritic = 0x0652 // Indicates the absence of a vowel
)

All known Diacritics

type RuneProcessor

type RuneProcessor func(l *lexer) string

func Consonant

func Consonant(roman string) RuneProcessor

Jump to

Keyboard shortcuts

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