NChinese 0.7.1
See the version list below for details.
dotnet add package NChinese --version 0.7.1
NuGet\Install-Package NChinese -Version 0.7.1
<PackageReference Include="NChinese" Version="0.7.1" />
paket add NChinese --version 0.7.1
#r "nuget: NChinese, 0.7.1"
// Install NChinese as a Cake Addin #addin nuget:?package=NChinese&version=0.7.1 // Install NChinese as a Cake Tool #tool nuget:?package=NChinese&version=0.7.1
NChinese
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. |
-
net6.0
- Serilog (>= 2.10.0)
- System.ValueTuple (>= 4.5.0)
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.