UinhKyaengh.js
UinhKyaengh.js is a JavaScript library for working with 韻鏡系韻圖 (Yunjing-type rime tables), specifically 韻鏡 (Yunjing) and 七音略 (Qiyin lüe). It provides a formalised, programmatic representation of traditional rime tables and enables bidirectional conversion between 韻鏡位置 and TshetUinh.js 音韻地位.
The core abstraction of this library is the 韻鏡位置 object. A 韻鏡位置 is defined by a three-dimensional coordinate system consisting of 轉號, 上位, and 右位. From this representation, the library can generate canonical descriptions, perform structural analysis, and interoperate with the 音韻地位 model used in TshetUinh.js.
This library is designed for researchers, developers, and students who require a precise model of traditional Chinese rime tables.
Installation
npm install uinh-kyaenghBasic Usage
Creating a 韻鏡位置
A 韻鏡位置 can be instantiated directly from its coordinates (轉號, 上位, 右位). The object exposes a human-readable description that follows the traditional terminology of 韻鏡.
Here, we use the character 直 as an example, which is located at the 42th 轉, the 15th position counted from top to bottom, and the 7th position counted from right to left.

const 當前韻鏡位置 = new 韻鏡位置(42, 15, 7); // 「直」
console.log(當前韻鏡位置.描述); // 外轉第四十二圖·舌音第三位·入聲位·韻鏡三等
console.log(韻鏡位置2字頭(當前韻鏡位置)); // 直Converting 音韻地位 to 韻鏡位置
UinhKyaengh.js supports conversion from TshetUinh.js 音韻地位 objects into 韻鏡位置. This allows existing phonological analyses based on TshetUinh.js to be projected directly onto the 韻鏡 framework.
const 當前音韻地位 = 音韻地位.from描述('澄開三蒸入'); // 「直」
const 當前韻鏡位置 = 音韻地位2韻鏡位置(當前音韻地位);
console.log(當前韻鏡位置.坐標); // (42,15,7)Converting 韻鏡位置 to 音韻地位
A 韻鏡位置 object can also be converted back into a TshetUinh.js 音韻地位. This makes the mapping between the two systems reversible within the supported domain.
const 當前韻鏡位置 = new 韻鏡位置(42, 15, 7); // 「直」
const 當前音韻地位 = 當前韻鏡位置.to音韻地位();
console.log(當前音韻地位.描述); // 澄開三蒸入For more information on the API, please refer to the API Documentation.