You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
treedb, an implementation of Rime’s user DB based on Kyoto Cabinet
legacy_userdb, an alias of treedb, used by user_dict_upgrade task to convert legacy user dictionary files to newer format
Install
Build dependencies
compiler with C++11 support
cmake>=2.8
libboost>=1.46
libglog
libkyotocabinet
librime>=1.5
Runtime dependencies
libboost
libglog
libkyotocabinet
librime>=1.5
Build and install
cd librime
git clone https://github.com/rime/librime-legacy plugins/legacy
make
sudo make install
Usage
For user dictionary upgrade
Load the shared library librime-legacy.so into your input method application,
a module named legacy will be automatically registered and made available to librime.
When the deployment task user_dict_upgrade is run, Rime will try to load
legacy module and instantiate legacy_userdbs when converting
*.userdb.kct format user dictionaries to newer standard.
Use treedb component
If you wish to use treedb in your own Rime module, you should load legacy
module before using the components.
#include<rime_api.h>
#include<rime/setup.h>staticRIME_MODULE_LIST(required_modules, "legacy");
rime::LoadModules(required_modules);
rime::UserDb::Component* component = rime::UserDb::Require("treedb");
if (component) {
rime::Db* db = component->Create("my_db");
// ...delete db;
}
Credits
We are grateful to the makers of the following open source libraries: