Deprecated, check toyskkserv instead.
A toy SKK skkserv. Just made this for fun.
- Configurable dictionary via urls
- Automatically dictionary update
- Google Transliterate API
The following commands are supported:
0
: disconnect1midashi
: request candidates2
: get skkserv version3
: get skkserv host4midashi
: request completion
Some custom protocol for internal us:
creload
: reload dictionaries without restart- ...
$ make && copy bin/toyskkserv /usr/local/bin
$ brew tap waynezhang/homebrew-tap && brew install toyskkserv
A configuration file is required. toyskkserv tries to find toyskkserv.yml
in the following order:
$HOME/.config
- Current directory
Copy the sample file to the directory and start running:
$ toyskkserv [-v] serve
- Or
brew services start toyskkserv
help
: Show all commandsversion
: Show the versionreload
: Reload all dictionariesupdate
: Update dictionaries manuallyserve
: Start the server
DictionaryDirectory
: The directory where the dictionaries are downloaded to.
ListenAddr: 127.0.0.1:1178
: The host and port that the server listens to. It's recommended to only listen to localhost.
FallbackToGoogle: true
: Enable the request to Google Transliterate API.
If it's enabled, toyskkserv calls this API if there is no candidates found in local directionaries.
Plus, toyskkserv doesn't return any candidates if no candidates are found for exactly the original word segment to avoid the noise. For example, Goolge API returns the following response for ここではきものをぬぐ
:
[
["ここでは",
["ここでは", "個々では", "此処では"],
],
["きものを",
["着物を", "きものを", "キモノを"],
],
["ぬぐ",
["脱ぐ", "ぬぐ", "ヌグ"],
],
]
Since there are no word segment for the original request ここではきものをぬぐ
, no candidates will be returned. However, if the request word is ここでは
and Google API returns the following response:
[
[
"ここでは",
[
"ここでは",
"個々では",
"此処では",
"ココでは",
"ココデは"
]
]
]
toyskkserv returns /ここでは/個々では/此処では/ココでは/ココデは/
as response to SKK client.
UseDiskCache
: Use memory mapped file as cache to suppress memory usage. Temp file is located in $TMPDIR
. Use TOYSKKSERV_CACHE
to override the file path.
UpdateSchedule: monthly
: toyskkserv will try to update the dictionaries on very first day of the monthly. The following options are supporte
disabled
daily
weekly
monthly
debug
: this is only for debug purposes
Dictionaries:
- https://github.com/skk-dev/dict/raw/refs/heads/master/SKK-JISYO.L # 基本辞書
- https://github.com/skk-dev/dict/raw/refs/heads/master/SKK-JISYO.jinmei # 人名、特に日本人の姓名
- xxxx
URL and local file paths are supported. toyskkserv downloads remote dictionaries to the folder that defined above. The local dictionaries are refered directly and not copied to anywhere.