chinese-word-at-point
provides two additional chinese-word
and
chinese-or-other-word
things for thing-at-point
function. This library is
designed to be used by other library writers, to write apps that needs to deal
with Chinese, and is not useful by itself.
A Chinese word segmentation tool which has command line interface is required,
you can use jieba (结巴中文分词) or SCWS (简易中文分词系统), the former used by
default, if you use the latter, you have to set chinese-word-split-command
.
chinese-word-at-point
is available on Melpa.
Below are functions you can use:
- Use
(thing-at-point 'chinese-word)
to get Chinese word at point - Use
(thing-at-point 'chinese-or-other-word)
to get any possible word (including Chinese) at point - use
(chinese-word-chinese-string-p a-string)
to test whether a string consists of pure CJK characters.
You can also use (chinese-word-at-point)
and
(chinese-or-other-word-at-point)
if you prefer.