Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuchunyang/chinese-word-at-point.el
Get (most likely) Chinese word under the cursor in Emacs
https://github.com/xuchunyang/chinese-word-at-point.el
Last synced: 28 days ago
JSON representation
Get (most likely) Chinese word under the cursor in Emacs
- Host: GitHub
- URL: https://github.com/xuchunyang/chinese-word-at-point.el
- Owner: xuchunyang
- Created: 2015-01-09T08:20:28.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-11T09:41:11.000Z (over 7 years ago)
- Last Synced: 2024-08-03T23:23:41.164Z (3 months ago)
- Language: Emacs Lisp
- Homepage:
- Size: 10.7 KB
- Stars: 34
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* chinese-word-at-point.el
[[http://stable.melpa.org/#/chinese-word-at-point][file:http://stable.melpa.org/packages/chinese-word-at-point-badge.svg]]
[[http://melpa.org/#/chinese-word-at-point][file: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 [[https://github.com/fxsjy/jieba][jieba (结巴中文分词)]] or [[https://github.com/hightman/scws][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.