Skip to content
This repository has been archived by the owner on Feb 17, 2018. It is now read-only.

Commit

Permalink
Add support for kanji->romaji transformation via kakasi
Browse files Browse the repository at this point in the history
  • Loading branch information
fledermaus committed Sep 26, 2009
1 parent 44b8297 commit bb0d968
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions erbtranslate.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; erbtranslate.el --- Natural Language translation functions.
;; Time-stamp: <2007-11-23 11:29:50 deego>
;; Copyright (C) 2002 Alejandro Benitez
;; Time-stamp: <2009-09-26 22:33:14 fledermaus>
;; Copyright © 2002 Alejandro Benitez
;; Emacs Lisp Archive entry
;; Filename: erbtranslate.el
;; Package: erbot
Expand Down Expand Up @@ -113,6 +113,16 @@ unless both from and to are specified. *, any, - are allowed as wildcards."
(concat translate-program " --list-services")
'(t)))

(defun fsi-kks (&rest nihongo)
(let ( (coding-system-for-read 'euc-jp)
(coding-system-for-write 'euc-jp)
(text (mapconcat #'(lambda (x) (format "%s" x)) nihongo " ")) )
(with-temp-buffer
(insert text)
(shell-command-on-region
(point-min) (point-max)
"kakasi -i euc -Ha -Ka -Ja -Ea -ka -s | sed 's/ESC<2E>.//g'" nil t)
(buffer-string)) ))
;; temporarily disabled till clean support is provided by translate.el

;; (defun fsi-translate-web-page (from to url &rest args)
Expand Down

0 comments on commit bb0d968

Please sign in to comment.