Search Results for

    Show / Hide Table of Contents

    Class Chinese.HanyuPinyin

    The Hànyǔ Pīnyīn Chinese romanization system.
    For more information, visit: https://en.wikipedia.org/wiki/Hanyu_Pinyin

    Inheritance
    System.Object
    Chinese.HanyuPinyin
    Implements
    IReadingsSystem<Chinese.HanyuPinyin.ReadingTypes>
    IRomanizationSystem
    Namespace: Romanization
    Assembly: Romanization.NET.dll
    Syntax
    public sealed class HanyuPinyin : object, IReadingsSystem<Chinese.HanyuPinyin.ReadingTypes>, IRomanizationSystem

    Constructors

    | Improve this Doc View Source

    HanyuPinyin()

    Instantiates a copy of the system to process romanizations.

    Declaration
    public HanyuPinyin()

    Properties

    | Improve this Doc View Source

    Type

    The type of the system - this is an important consideration depending on the purpose of romanizing the text.
    For more information, visit: https://en.wikipedia.org/wiki/Romanization#Methods

    Declaration
    public SystemType Type { get; }
    Property Value
    Type Description
    SystemType

    Methods

    | Improve this Doc View Source

    Process(String)

    Performs Hànyǔ Pīnyīn romanization on the given text.
    Uses the first (oft-most-common) reading of the character - standard Hànyǔ Pīnyīn first if available, then Hànyǔ Pīnyīn as it appeared in Xiàndài Hànyǔ Pínlǜ Cídiǎn, then as it appeared in Xiàndài Hànyǔ Cídiǎn.
    If more readings are required, use ProcessWithReadings(String) instead.

    Declaration
    public string Process(string text)
    Parameters
    Type Name Description
    System.String text

    The text to romanize.

    Returns
    Type Description
    System.String

    A romanized version of the text, leaving unrecognized characters untouched. Note that all romanized text will be lowercase.

    | Improve this Doc View Source

    Process(String, Chinese.HanyuPinyin.ReadingTypes)

    Performs Hànyǔ Pīnyīn romanization on the given text.
    Uses the first (oft-most-common) reading of the character - standard Hànyǔ Pīnyīn first if available, then Hànyǔ Pīnyīn as it appeared in Xiàndài Hànyǔ Pínlǜ Cídiǎn, then as it appeared in Xiàndài Hànyǔ Cídiǎn.
    If more readings are required, use ProcessWithReadings(String, Chinese.HanyuPinyin.ReadingTypes) instead.

    Declaration
    public string Process(string text, Chinese.HanyuPinyin.ReadingTypes readingsToUse)
    Parameters
    Type Name Description
    System.String text

    The text to romanize.

    Chinese.HanyuPinyin.ReadingTypes readingsToUse

    The reading types to use.

    Returns
    Type Description
    System.String

    A romanized version of the text, leaving unrecognized characters untouched. Note that all romanized text will be lowercase.

    | Improve this Doc View Source

    ProcessWithReadings(String)

    Performs Hànyǔ Pīnyīn romanization on the given text.
    Returns a collection of all the characters in text, but with all readings (pronunciations) of each.
    Returns the following readings for characters if they exist: standard Hànyǔ Pīnyīn, Hànyǔ Pīnyīn as it appeared in Xiàndài Hànyǔ Pínlǜ Cídiǎn, and Hànyǔ Pīnyīn as it appeared in Xiàndài Hànyǔ Cídiǎn.

    Declaration
    public ReadingsString<Chinese.HanyuPinyin.ReadingTypes> ProcessWithReadings(string text)
    Parameters
    Type Name Description
    System.String text

    The text to romanize.

    Returns
    Type Description
    ReadingsString<Chinese.HanyuPinyin.ReadingTypes>

    A ReadingsString<TType> with all readings for each character in text.

    | Improve this Doc View Source

    ProcessWithReadings(String, Chinese.HanyuPinyin.ReadingTypes)

    Performs Hànyǔ Pīnyīn romanization on the given text.
    Returns a collection of all the characters in text, but with all readings (pronunciations) of each.
    Returns the following readings for characters if in readingsToUse and they exist: standard Hànyǔ Pīnyīn, Hànyǔ Pīnyīn as it appeared in Xiàndài Hànyǔ Pínlǜ Cídiǎn, and Hànyǔ Pīnyīn as it appeared in Xiàndài Hànyǔ Cídiǎn.

    Declaration
    public ReadingsString<Chinese.HanyuPinyin.ReadingTypes> ProcessWithReadings(string text, Chinese.HanyuPinyin.ReadingTypes readingsToUse)
    Parameters
    Type Name Description
    System.String text

    The text to romanize.

    Chinese.HanyuPinyin.ReadingTypes readingsToUse

    The reading types to use.

    Returns
    Type Description
    ReadingsString<Chinese.HanyuPinyin.ReadingTypes>

    A ReadingsString<TType> with all readings for each character in text.

    Implements

    IReadingsSystem<TType>
    IRomanizationSystem
    • Improve this Doc
    • View Source
    In This Article
    Back to top Romanization.NET