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

使用 cnchar-trad 後,簡體詞語的拼音有誤 #283

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

使用 cnchar-trad 後,簡體詞語的拼音有誤 #283

fixicelo opened this issue Apr 3, 2024 · 0 comments

Comments

@fixicelo
Copy link

fixicelo commented Apr 3, 2024

在使用了 cnchar-trad 後,簡體 音乐 由正確的 yuè (見 Test2) 變成了錯誤的 (見 Test4)

import cnchar from "cnchar"

const testText = "音樂,音乐"
console.log("Test1:", cnchar.spell(testText, "array", "tone", "low"))
// Test1: [ 'yīn', '樂', ',', 'yīn', 'lè' ]

import poly from "cnchar-poly"
cnchar.use(poly)
console.log("Test2 (used poly):", cnchar.spell(testText, "array", "tone", "low"))
// Test2 (used poly): [ 'yīn', '樂', ',', 'yīn', 'yuè' ]

import "cnchar-trad"
console.log("Test3 (imported trad):", cnchar.spell(testText, "array", "tone", "low"))
// Test3 (imported trad): [ 'yīn', '樂', ',', 'yīn', 'yuè' ]

import trad from "cnchar-trad"
cnchar.use(trad)
console.log("Test4 (used trad):", cnchar.spell(testText, "array", "tone", "low"))
// Test4 (used trad): [ 'yīn', 'yuè', ',', 'yīn', 'lè' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant