Skip to content
Snippets Groups Projects
Commit f2065a91 authored by rtoy's avatar rtoy
Browse files

Some Hangul syllables were left out of the Hangul syllable dictionary.

Redo this by looping over all codepoints and selecting the codepoints
that are Hangul syllables.
parent 820f2554
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;;; This code was written by Paul Foley and has been placed in the public ;;; This code was written by Paul Foley and has been placed in the public
;;; domain. ;;; domain.
;;; ;;;
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unidata.lisp,v 1.16 2010/09/18 21:10:42 rtoy Exp $") (ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unidata.lisp,v 1.17 2010/09/18 21:38:10 rtoy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
(defconstant +unidata-path+ #p"ext-formats:unidata.bin") (defconstant +unidata-path+ #p"ext-formats:unidata.bin")
(defvar *unidata-version* "$Revision: 1.16 $") (defvar *unidata-version* "$Revision: 1.17 $")
(defstruct unidata (defstruct unidata
range range
...@@ -1343,18 +1343,14 @@ ...@@ -1343,18 +1343,14 @@
*reverse-hangul-jungseong* *reverse-hangul-jungseong*
*reverse-hangul-jongseong*) *reverse-hangul-jongseong*)
:test #'string= :key #'car))) :test #'string= :key #'car)))
(k 0) (names
names) (loop for codepoint from 0 below codepoint-limit
(loop for choseong across *reverse-hangul-choseong* do when (hangul-syllable-p codepoint)
(loop for junseong across *reverse-hangul-jungseong* do collect (cons (subseq (format nil "~A"
(loop for jongseong across *reverse-hangul-jongseong* do (string-upcase (char-name (code-char codepoint))))
(push (cons (format nil "~A~A~A" 16)
(car choseong) codepoint))))
(car junseong)
(car jongseong))
k)
names)
(incf k))))
(setf *hangul-syllable-dictionary* (setf *hangul-syllable-dictionary*
(build-dictionary hangul-codebook (nreverse names))) (build-dictionary hangul-codebook (nreverse names)))
(format t "~&Done.~%") (format t "~&Done.~%")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment