libkkc icon indicating copy to clipboard operation
libkkc copied to clipboard

kkc gives incorrect results regarding to the word 令和

Open xuzhao9 opened this issue 5 years ago • 2 comments

For example:

>> れいわ
0: <令/れい><わ/わ>

The correct result should be: <令和/れいわ>

>> れいわじだい
0: <れ/れ><岩/いわ><時代/じだい>

The correct result should be: <令和/れいわ><時代/じだい>

I am using libkkc 0.3.5+git20190809.b2e5a15-2.1.

xuzhao9 avatar Mar 03 '20 18:03 xuzhao9

This is a bug caused by the frontend fcitx5-kkc, as it failed to load the SKK dictionary.

xuzhao9 avatar Mar 03 '20 20:03 xuzhao9

Some further investigations: At https://github.com/ueno/libkkc/blob/master/libkkc/context.vala#L174, the context CLEARS the all dictionaries in the context. When the user quits a program, fcitx5-kkc will deconstruct a Context, which clears the dictionary. The next time a program opens, kkc will lose all the dictionary information.

Now the question is: should kkc State keep the dictionary information even though it destructs, and let the caller handle the dictionary resource?

xuzhao9 avatar Mar 03 '20 20:03 xuzhao9