Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支援繁體詞語 #212

Open
fixicelo opened this issue Apr 3, 2024 · 7 comments
Open

支援繁體詞語 #212

fixicelo opened this issue Apr 3, 2024 · 7 comments
Labels
feature A feature need to add

Comments

@fixicelo
Copy link

fixicelo commented Apr 3, 2024

功能描述

在測試過程中,我發現對於繁體中文,如 音樂 一詞中的 ,其讀音結果顯示為 ,僅有在簡體中文下 ,其讀音才正確地顯示為 yuè

import { html } from 'pinyin-pro';

const htmlString = html('繁體:音樂, 樂器, 樂譜, 樂府, 奏樂, 樂壇, 樂章 | 简体:音乐, 乐器, 乐譜, 乐府, 奏乐, 乐壇, 乐章');

document.body.innerHTML = htmlString;

測試結果 中也另外發現 乐譜乐壇 應該未有收納,以致未能正確顯示拼音。

我認為與目前的詞庫只有 dict1 包含繁體字有關。一旦遇到繁體的詞語,拼音可能就會出現不準確的情況。

音乐: 'yīn yuè',

希望能擴大繁體的支援範疇(#61),包含詞語、成語等。謝謝!

@yisibl
Copy link
Collaborator

yisibl commented Apr 8, 2024

我们首先需要提取一份官方规范的简繁对照表

@warm-ice0x00
Copy link

能用 OpenCC 的转换表 STPhrases.txt 吗?

@zh-lx
Copy link
Owner

zh-lx commented Apr 12, 2024

能用 OpenCC 的转换表 STPhrases.txt 吗?

这个转换只是部分词的,支持不了全场景,期望有一份字到字的全量转换表,这样可能支持全部的范围

@zh-lx zh-lx added the feature A feature need to add label Apr 17, 2024
@warm-ice0x00
Copy link

OpenCC 有 字到字转换表,但须考虑以下问题:

  1. 陆、港、台地区 繁体字规范 不同,如“爲”“為”、“着”“著”。本库要支持哪种规范?
  2. 两岸一些词读音不同,如“说服”(shuō fú / shuì fú)“垃圾”(lā jī / lè sè)“褪色”(tuì sè / tùn sè)“悬崖”(xuán yá / xuán yái)。本库要输出哪种读音?
  3. 简繁体字并非一一对应,如“乾”算不算多音字?

@zh-lx
Copy link
Owner

zh-lx commented Apr 30, 2024 via email

@warm-ice0x00
Copy link

试着用 s2t 配置的 OpenCC 转换了 dict2.ts。结果未校对,欢迎批评指正。
dict2_merged.zip

@Shyam-Chen
Copy link

Shyam-Chen commented Sep 13, 2024

應該不需要支援,在台是用「注音」拼寫;港澳是用「速成」拼寫

如,注音拼漢字:

  • 樂 -> "ㄌㄜˋ"
  • 音樂 -> "ㄧㄣ " "ㄩㄝˋ"
  • 說服 -> "ㄕㄨㄟˋ" "ㄈㄨˊ"
  • 乾 -> "ㄍㄢ "
  • 漢字 -> "ㄏㄢˋ" "ㄗˋ"
  • 漢語拼音 -> "ㄏㄢˋ" "ㄩˇ" "ㄆㄧㄣ " "ㄧㄣ "
  • 睡著了 -> "ㄕㄨㄟˋ" "ㄓㄠˊ" "ㄌㄜ˙"
  • Tone -> " " "ˊ" "ˇ" "ˋ" "˙"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature need to add
Projects
None yet
Development

No branches or pull requests

5 participants