[Uim] License question

Kenichi Handa handa at m17n.org
Wed Jul 20 05:34:06 EEST 2005


In article <20050720024642.767e7be8.tkng at xem.jp>, TOKUNAGA Hiroyuki <tkng at xem.jp> writes:

> On Tue, 19 Jul 2005 12:02:34 +0900
> TOKUNAGA Hiroyuki <tkng at xem.jp> wrote:

>>  2. Find out free pinyin table from somewhere

> Yusuke give me an awesome advice. We can use the pinyin table of m17n-
> lib! As the license of m17n-lib is LGPL, problem will disappear. I'll
> do replacement after 0.4.8 release.

I must confess that I'm not 100% sure about the copyright of
the file zh-py.mim included in m17n-db.  It is generated by
the attached Emacs Lisp program.  The program itself is
surely mine.  But, Emacs is using GPLed file pinyin.map
included in "cce" package.

---
Kenichi Handa
handa at m17n.org

(let ((initial '("" "b" "p" "m" "f" "d" "t" "n" "l" "g" "k" "h" "z" "c" "s"
		 "zh" "ch" "sh" "r" "j" "q" "w" "x" "y"))
      (final '("" "a" "ai" "an" "ang" "ao" 
	       "e" "ei" "en" "eng" "er" 
	       "i" "ia" "ian" "iang" "iao" "ie" "in" "ing" "iong" "iu"
	       "o" "ong" "ou" 
	       "u" "u:" "ua" "uai" "uan" "uang" "ue" "ui" "un" "uo"
	       "ng")))
  (with-temp-file "~/temp"
    (activate-input-method "chinese-py")
    (dolist (i initial)
      (dolist (f final)
	(let ((entry (quail-lookup-key (concat i
					       (if (string= f "u:") "v" f)))))
	  (if (consp entry)
	      (if (and (consp (car entry))
		       (vectorp (cdr (car entry))))
		  (setq entry (cdr (car entry)))
		(if (integerp (car entry))
		    (setq entry (vector (string (car entry))))
		  (setq entry nil))))
	  (when entry
	    (insert (format "\n  (%S (" (concat i f)))
	    (let ((count 0))
	      (mapc (lambda (x) 
		      (if (> (% count 10) 0) 
			  (insert x)
			(if (> count 0) (insert "\" "))
			(insert "\"" x))
		      (setq count (1+ count)))
		    entry))
	    (insert "\"))")))))
    (sort-lines nil 1 (point-max))
    (goto-char 1)
    (replace-string "u:" "v")
    (goto-char 1)
    (insert " (pinyin")
    (goto-char (point-max))
    (insert ")\n")))



More information about the uim mailing list