Liking cljdoc? Tell your friends :D

study.sino.pinyin

Functions for converting between different representations of Hànyǔ Pīnyīn.

Worth noting:

  • The neutral tone is represented as 0 or 5 (or left out) when using digits.
  • Like in many Pīnyīn input methods, a V is treated as a Ü.
  • The non-standard Pīnyīn M is supported (as found in e.g. cc-cedict).
  • The very common érhuà-style final R is supported as well.
Functions for converting between different representations of Hànyǔ Pīnyīn.

Worth noting:

  - The neutral tone is represented as 0 or 5 (or left out) when using digits.
  - Like in many Pīnyīn input methods, a V is treated as a Ü.
  - The non-standard Pīnyīn M is supported (as found in e.g. cc-cedict).
  - The very common érhuà-style final R is supported as well.
raw docstring

char->toneclj/s

(char->tone char-str)

Get the tone digit (0-4) based on a char-str, presumably with a diacritic.

Get the tone digit (0-4) based on a `char-str`, presumably with a diacritic.
raw docstring

diacritic-indexclj/s

(diacritic-index syllable)

Get the index of syllable where the Pinyin diacritic should be.

Derived from the guideline at: http://www.pinyin.info/rules/where.html

Get the index of `syllable` where the Pinyin diacritic should be.

Derived from the guideline at: http://www.pinyin.info/rules/where.html
raw docstring

diacritics->digitsclj/s

(diacritics->digits s)

Convert a Pinyin string s with tone diacritics into one with tone digits.

Convert a Pinyin string `s` with tone diacritics into one with tone digits.
raw docstring

digit->diacriticclj/s

(digit->diacritic syllable)

Convert a syllable with an affixed tone digit into one with a diacritic. If converting more than a single syllable, use digits->diacritics instead!

Note: this function can also take Pinyin finals as input!

Convert a `syllable` with an affixed tone digit into one with a diacritic.
If converting more than a single syllable, use digits->diacritics instead!

Note: this function can also take Pinyin finals as input!
raw docstring

digits->diacriticsclj/s

(digits->diacritics s & {:keys [v-as-umlaut?] :or {v-as-umlaut? false}})

Convert a Pinyin string s with tone digits into one with tone diacritics.

Convert a Pinyin string `s` with tone digits into one with tone diacritics.
raw docstring

no-diacriticsclj/s

(no-diacritics s)
(no-diacritics s [[replacement match] & xs])

Remove Pinyin diacritics from the input string s.

Remove Pinyin diacritics from the input string `s`.
raw docstring

no-digitsclj/s

(no-digits s)

Remove digits from the input string s.

Remove digits from the input string `s`.
raw docstring

with-diacriticclj/s

(with-diacritic tone char)

Get the diacriticised char based on Pinyin tone (0 through 5).

Get the diacriticised `char` based on Pinyin `tone` (0 through 5).
raw docstring

with-umlautclj/s

(with-umlaut s)

Replace the common substitute letter V in s with the proper Pinyin Ü.

Replace the common substitute letter V in `s` with the proper Pinyin Ü.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close