NChinese 1.1.0

dotnet add package NChinese --version 1.1.0                
NuGet\Install-Package NChinese -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NChinese" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NChinese --version 1.1.0                
#r "nuget: NChinese, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NChinese as a Cake Addin
#addin nuget:?package=NChinese&version=1.1.0

// Install NChinese as a Cake Tool
#tool nuget:?package=NChinese&version=1.1.0                

NChinese

Build status  NuGet Badge

NChinese 是一套用來處理中文字詞的函式庫。目前具備的功能,主要是反查一串中文字的注音或拼音。

安裝

使用 Nuget 套件管理員來安裝,或執行下列命令:

Install-Package NChinese -ProjectName YourProject

簡介

NChinese 內建中文注音詞庫,並提供了反查注音字根與其他輔助 API。

範例:反查注音字根

using NChinese;

// 取得一串中文字的注音字根
var zhuyinProvider = new ZhuyinReverseConversionProvider();
string[] zhuyinArray = zhuyinProvider.Convert("便宜又方便得不得了");

foreach (var s in zhuyinArray)
    Console.Write($"{s} ");  

執行結果:

ㄆㄧㄢˊ ㄧˊ ㄧㄡˋ ㄈㄤ ㄅㄧㄢˋ ㄉㄜ˙ ㄅㄨˋ ㄉㄜˊ ㄌㄧㄠˇ

中文詞庫與注音字根的資料,是以 libchewing 的檔案(tsi.src)為藍本,再經過工具加工之後所產生的。所以透過上述方法所取得的注音字根,在讀音方面比較符合台灣的發音習慣。

開發工具

  • Visual Studio 2022

相依套件

建置工具

未來可能加入什麼功能

  • 中文簡繁轉換
  • 注音符號轉成拼音

授權協議

Copyright(c) 2018-2022 Michael Tsai.

此開源專案是採用 MIT 授權

另外,注音字典 ZhuyinDictionary.txt 是以新酷音 libchewing 的檔案(tsi.src)為藍本,再經過工具加工之後所產生的。新酷音的授權協議是 GNU LGPL v2.1

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on NChinese:

Package Downloads
NChinese.Imm

NChinese.Imm provides helper classes for doing reverse conversion via IFELanguage COM objects. That is, you can use this library to get Zhuyin (aka BoPoMoFo) or Pinyin symbols for a Chinese string.

GitHub repositories

This package is not used by any popular GitHub repositories.

Initial release as Nuget package.