youdao-dictionary
ist eine einfache Youdao-Wörterbuch-Schnittstelle (有道词典) für Emacs.
Installieren Sie youdao-dictionary
von MELPA mit:
Mx package-install RET youdao-dictionary RET
Youdao hat die kostenlose API Anfang des Jahres (2023) eingestellt, sodass dieses Paket nicht mehr sofort einsatzbereit ist. Sie müssen selbst eine API beantragen.
Sie können Ihren API-Schlüssel und Ihr Geheimnis in ~/.authinfo.gpg
oder ~/.authinfo
festlegen, z. B.
Maschine openapi.youdao.com Login 应用ID Passwort 应用秘钥
Alternativ können Sie sie in Ihrer Konfiguration festlegen, z. B.
; ; Change 应用ID and 应用秘钥 to yours
( setq youdao-dictionary-app-key "应用ID "
youdao-dictionary-secret-key "应用秘钥" )
youdao-dictionary-search-at-point
youdao-dictionary-search-at-point+
youdao-dictionary-search-at-point-tooltip
youdao-dictionary-search-at-point-posframe
youdao-dictionary-search-from-input
youdao-dictionary-search-and-replace
youdao-dictionary-play-voice-at-point
youdao-dictionary-play-voice-from-input
youdao-dictionary-posframe-tip-face
tooltip
; ; 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)
Hinweise : Um die Unterstützung der chinesischen Wortsegmentierung zu ermöglichen, ist ein externes Tool zur Segmentierung chinesischer Wörter (z. B. 结巴分词) erforderlich. Weitere Informationen finden Sie unter chinese-word-at-point.el#prerequisite.