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

請問可以自訂習慣用詞嗎? #5

Open
Randytsay opened this issue Mar 2, 2025 · 1 comment
Open

請問可以自訂習慣用詞嗎? #5

Randytsay opened this issue Mar 2, 2025 · 1 comment

Comments

@Randytsay
Copy link

我有試著在/Dictionary/TWPhrasesOther.txt 後面新增字詞,但無效
請問可以怎麼做呢?謝謝

@CosineG
Copy link
Owner

CosineG commented Mar 3, 2025

可能是因为你的词语被结巴分词给分割了,所以没有办法被整个转换。
你需要先在结巴分词的字典(JiebaResource/dict.txt 或者建一个自定义词典在程序里读取)添加你的词语,比如

赤座灯里 1 n

分别是词语、词频、词性。添加以后,结巴分词就不会把这个词组给拆开。
然后再在 /Dictionary/TWPhrasesOther.txt 里添加转换(左边需要用 OpenCC 标准):

赤座燈裏 赤座明

重新启动程序就可以了:

Image

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

2 participants