Lines Matching defs:word
11 word-indices
12 word-indices-index
15 (defstruct word-list
81 (let* ((word (subseq name i1 i2))
82 (len (length word)))
88 (make-word-list
92 (let ((word-list (aref words-by-length len)))
93 (unless (gethash word (word-list-hashed word-list))
94 (setf (gethash word (word-list-hashed word-list)) t)
95 (push word (word-list-sorted word-list))
100 ;; Sort the word lists.
104 (make-word-list
108 (let ((word-list (aref words-by-length len)))
109 (setf (word-list-sorted word-list)
110 (sort (word-list-sorted word-list) #'string<)
112 (setf (word-list-size word-list)
113 (reduce #'+ (mapcar #'length (word-list-sorted word-list)))
115 (setf (word-list-length word-list)
116 (length (word-list-sorted word-list))
131 (let ((word-list (aref words-by-length len)))
132 (incf sum (word-list-size word-list))
137 (let ((word-list (aref words-by-length len)))
138 (dolist (word (word-list-sorted word-list))
139 (format ostream " ~{ '~C',~}~%" (coerce word 'list))
145 (let ((word-list (aref words-by-length len)))
146 (incf sum (word-list-length word-list))
154 (let ((word-list (aref words-by-length len)))
155 (incf sum (word-list-length word-list))
160 (let ((word-list (aref words-by-length len)))
161 (when (word-list-sorted word-list)
163 (do ((l (word-list-sorted word-list) (cdr l))
178 (let ((word-list (aref words-by-length len)))
180 (incf extra-offset (word-list-size word-list))
181 (incf ind-offset (word-list-length word-list))
188 (let ((word-list (aref words-by-length len)))
189 (dolist (word (word-list-sorted word-list))
190 (setf (gethash word (word-list-hashed word-list)) ind-offset)
193 (dolist (word '("HANGUL" "SYLLABLE" "CJK" "COMPATIBILITY"))
194 (format ostream "#define UNICODE_CHARNAME_WORD_~A ~D~%" word
195 (gethash word (word-list-hashed (aref words-by-length (length word))))
197 ;; Compute the word-indices for every unicode-char.
205 (let* ((word (subseq name i1 i2))
206 (len (length word)))
207 (push (gethash word (word-list-hashed (aref words-by-length len)))
213 (setf (unicode-char-word-indices uc)
217 ;; Sort the list of unicode-chars by word-indices.
234 :key #'unicode-char-word-indices
236 ;; Output the word-indices.
238 (reduce #'+ (mapcar (lambda (uc) (length (unicode-char-word-indices uc))) all-chars))
244 (coerce (unicode-char-word-indices uc) 'list)
251 (setf (unicode-char-word-indices-index uc) i)
252 (incf i (length (unicode-char-word-indices uc)))
261 (unicode-char-word-indices-index uc)
275 (unicode-char-word-indices-index uc)
287 (reduce #'max (mapcar (lambda (uc) (length (unicode-char-word-indices uc))) all-chars))