CHSPinYinConv 1.0.0

Simplified Chinese Pin-Yin Conversion Library provides a Set of  APIs that  extract Simplified Chinese Character properties, such as sounds, homophone and polyphone.

Install-Package CHSPinYinConv -Version 1.0.0
dotnet add package CHSPinYinConv --version 1.0.0
<PackageReference Include="CHSPinYinConv" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CHSPinYinConv --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CHSPinYinConv, 1.0.0"
For F# scripts that support #r syntax, copy this into the source code to reference the package.
// Install CHSPinYinConv as a Cake Addin
#addin nuget:?package=CHSPinYinConv&version=1.0.0

// Install CHSPinYinConv as a Cake Tool
#tool nuget:?package=CHSPinYinConv&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Examples

The following code demonstrates the returning stroke number of a given character in user scenario.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.International.Converters.PinYinConverter;

namespace Example_CS
{
    class Program
    {
        static void Main(string[] args)
        {
            ChineseChar chineseChar = new ChineseChar('微');
            Console.WriteLine("Stroke number of 微 in Chinese is {0}.", chineseChar.StrokeNumber);
            Console.WriteLine("{0} characters' pinyin is \"wei1\".", ChineseChar.GetHomophoneCount("wei1"));
            if(ChineseChar.IsHomophone('微', '薇'))
            {
                Console.WriteLine("微 and 薇 have the same pinyin.");
            }
            else
            {
                Console.WriteLine("微 and 薇 have different pinyins.");
            }
        }
    }
}

// This code produces the following output:
// 
// Stroke number of 微 in Chinese is 13.
// 37 characters' pinyin is "wei1".
// 微 and 薇 have the same pinyin.

Examples

The following code demonstrates the returning stroke number of a given character in user scenario.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.International.Converters.PinYinConverter;

namespace Example_CS
{
    class Program
    {
        static void Main(string[] args)
        {
            ChineseChar chineseChar = new ChineseChar('微');
            Console.WriteLine("Stroke number of 微 in Chinese is {0}.", chineseChar.StrokeNumber);
            Console.WriteLine("{0} characters' pinyin is \"wei1\".", ChineseChar.GetHomophoneCount("wei1"));
            if(ChineseChar.IsHomophone('微', '薇'))
            {
                Console.WriteLine("微 and 薇 have the same pinyin.");
            }
            else
            {
                Console.WriteLine("微 and 薇 have different pinyins.");
            }
        }
    }
}

// This code produces the following output:
// 
// Stroke number of 微 in Chinese is 13.
// 37 characters' pinyin is "wei1".
// 微 and 薇 have the same pinyin.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CHSPinYinConv:

Package Downloads
DwFramework.Core
DwFramework 核心库
SciGrace.Web.Core
科颐轩网站通用类库

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 24,322 12/21/2017