Skip to content

xuchunyang/chinese-word-at-point.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chinese-word-at-point.el

http://stable.melpa.org/packages/chinese-word-at-point-badge.svg http://melpa.org/packages/chinese-word-at-point-badge.svg

About

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.

Prerequisite

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.

Installation

chinese-word-at-point is available on Melpa.

Usage

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.

About

Get (most likely) Chinese word under the cursor in Emacs

Resources

Stars

Watchers

Forks

Packages

No packages published