24

GitHub - xuchunyang/youdao-dictionary.el: Youdao Dictionary(有道词典) interface...

 5 years ago
source link: https://github.com/xuchunyang/youdao-dictionary.el
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.org

Youdao Dictionary interface for Emacs

http://melpa.org/packages/youdao-dictionary-badge.svg http://stable.melpa.org/packages/youdao-dictionary-badge.svg

youdao-dictionary is a simple Youdao Dictionary (有道词典) interface for Emacs.

Installation

Install youdao-dictionary from MELPA with:

M-x package-install RET youdao-dictionary RET

Usage

youdao-dictionary-search-at-pointSearch word at point and display result with buffer youdao-dictionary-search-at-point+Search word at point and display result with popup-tip youdao-dictionary-search-from-inputSearch word from input and display result with buffer youdao-dictionary-search-and-replaceSearch word at point and display result with popup-menu, replace word with selected translation. youdao-dictionary-play-voice-at-pointPlay voice of word at point (by @snyh) youdao-dictionary-play-voice-from-inputPlay voice of word from input (by @snyh)

Sample configuration

;; Enable Cache
(setq url-automatic-caching t)

;; Example Key binding
(global-set-key (kbd "C-c y") 'youdao-dictionary-search-at-point)

;; Integrate with popwin-el (https://github.com/m2ym/popwin-el)
;; (push "*Youdao Dictionary*" popwin:special-display-config)

;; Set file path for saving search history
;; (setq youdao-dictionary-search-history-file "~/.emacs.d/.youdao")

;; Enable Chinese word segmentation support (支持中文分词)
;; (setq youdao-dictionary-use-chinese-word-segmentation t)

Notes: A external Chinese word segmentation tool (e.g. 结巴分词) is needed to enable Chinese word segmentation support. For more info, see chinese-word-at-point.el#prerequisite.

Related tools

ydcvYouDao Console Version fanyiA translate tool in your command line (supports both Youdao and iciba)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK