* Added char-general-category and a category lookup table.

This commit is contained in:
Abdulaziz Ghuloum 2007-09-03 04:42:46 -04:00
parent ad1c469ffb
commit b5d3ceebe4
6 changed files with 338 additions and 13 deletions

Binary file not shown.

View File

@ -4,7 +4,7 @@
char-downcase char-upcase char-titlecase char-foldcase
char-ci=? char-ci<? char-ci<=? char-ci>? char-ci>=?
string-ci=? string-ci<? string-ci<=? string-ci>? string-ci>=?
string-foldcase)
string-foldcase char-general-category )
(import
(ikarus system $fx)
(ikarus system $vectors)
@ -15,7 +15,7 @@
(except (ikarus) char-downcase char-upcase char-titlecase char-foldcase
char-ci=? char-ci<? char-ci<=? char-ci>? char-ci>=?
string-ci=? string-ci<? string-ci<=? string-ci>? string-ci>=?
string-foldcase))
string-foldcase char-general-category))
(include "unicode/unicode-constituents.ss")
(include "unicode/unicode-char-cases.ss")
@ -31,6 +31,27 @@
[($fx<= ($vector-ref v j) n) (f j k n v)]
[else (f i ($fx- j 1) n v)]))]))))
(define (char-general-category c)
(let ([v unicode-categories-lookup-vector]
[t unicode-categories-values-vector])
(define (f i k n)
(cond
[(fx= i k)
(let ([idx (vector-ref t i)])
(if (fixnum? idx)
idx
(let ([idx2 (fx- n (vector-ref v i))])
(vector-ref idx idx2))))]
[else
(let ([j (fxsra (fx+ i (fx+ k 1)) 1)])
(cond
[(fx<= (vector-ref v j) n) (f j k n)]
[else (f i (fx- j 1) n)]))]))
(if (char? c)
(vector-ref unicode-categories-name-vector
(f 0 (fx- (vector-length v) 1) (char->integer c)))
(error 'char-general-category "~s is not a char" c))))
(define (binary-search-on? n v)
($fx= ($fxlogand (binary-search n v) 1) 1))
@ -200,13 +221,5 @@
(define string-ci>=? (string-ci-cmp 'string-ci>=? string>=?))
;(define (string-ci=? s1 s2)
; (if (string? s1)
; (if (string? s2)
; (string=? ($string-foldcase s1) ($string-foldcase s2))
; (error 'string-ci=? "~s is not a string" s2))
; (error 'string-ci=? "~s is not a string" s1)))
)

View File

@ -586,6 +586,7 @@
[comment-handler i]
[print-gensym i symbols]
[print-unicode i]
[char-general-category i]
[gensym-count i symbols]
[gensym-prefix i symbols]
[make-hash-table i]

View File

@ -747,7 +747,7 @@
[char-foldcase C uc]
[char-titlecase C uc]
[char-upcase C uc se]
[char-general-category S uc]
[char-general-category C uc]
[char-lower-case? S uc se]
[char-numeric? S uc se]
[char-title-case? S uc]

View File

@ -66,12 +66,107 @@
(read (open-input-string (format "#x~a" num)))
(string->symbol cat))))
(define categories
;;; 30 categories
'([Lu "Letter, Uppercase"]
[Ll "Letter, Lowercase"]
[Lt "Letter, Titlecase"]
[Lm "Letter, Modifier"]
[Lo "Letter, Other"]
[Mn "Mark, Nonspacing"]
[Mc "Mark, Spacing Combining"]
[Me "Mark, Enclosing"]
[Nd "Number, Decimal Digit"]
[Nl "Number, Letter"]
[No "Number, Other"]
[Pc "Punctuation, Connector"]
[Pd "Punctuation, Dash"]
[Ps "Punctuation, Open"]
[Pe "Punctuation, Close"]
[Pi "Punctuation, Initial quote"]
[Pf "Punctuation, Final quote"]
[Po "Punctuation, Other"]
[Sm "Symbol, Math"]
[Sc "Symbol, Currency"]
[Sk "Symbol, Modifier"]
[So "Symbol, Other"]
[Zs "Separator, Space"]
[Zl "Separator, Line"]
[Zp "Separator, Paragraph"]
[Cc "Other, Control"]
[Cf "Other, Format"]
[Cs "Other, Surrogate"]
[Co "Other, Private Use"]
[Cn "Other, Not Assigned"]
))
(define (category-index x)
(let f ([ls categories] [i 0])
(cond
[(null? ls) (error 'category-index "invalid cat ~s" x)]
[(eq? x (caar ls)) i]
[else (f (cdr ls) (add1 i))])))
(define (insert-missing ls)
(let f ([ls ls] [i 0] [ac '()])
(cond
[(> i #x10FFFF) (reverse ac)]
[(null? ls)
(f ls (+ i 1) (cons (cons i 'Cn) ac))]
[(= i (caar ls))
(f (cdr ls) (+ i 1) (cons (car ls) ac))]
[else
(f ls (+ i 1) (cons (cons i 'Cn) ac))])))
(define (make-cats-table ls)
(map
(lambda (x)
(cons (car x)
(cons (cadr x) (category-index (cddr x)))))
(let f ([i 1] [st (car ls)] [ls (cdr ls)] [ac '()])
(cond
[(null? ls) (reverse (cons (cons i st) ac))]
[(eq? (cdar ls) (cdr st)) (f (add1 i) st (cdr ls) ac)]
[else
(f 1 (car ls) (cdr ls) (cons (cons i st) ac))]))))
(define (merge-sequences ls)
(define (split ls)
(cond
[(null? ls) (values '() '())]
[(= (caar ls) 1)
(let-values ([(chain no-chain) (split (cdr ls))])
(values (cons (cdar ls) chain) no-chain))]
[else
(values '() ls)]))
(define (mk-chain a chain)
(cond
[(null? chain) a]
[else
(cons (car a)
(list->vector
(cons (cdr a)
(map cdr chain))))]))
(cond
[(null? ls) '()]
[(= (caar ls) 1)
(let-values ([(chain no-chain) (split (cdr ls))])
(cons (mk-chain (cdar ls) chain)
(merge-sequences no-chain)))]
[else (cons (cdar ls) (merge-sequences (cdr ls)))]))
(let ([ls (map cat (get-unicode-data "UNIDATA/UnicodeData.txt"))])
(let ([wanted
(codes-in-cats ls
'(Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pd Pc Po Sc Sm Sk So Co))])
'(Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pd Pc Po Sc Sm Sk So Co))]
[cats-table (merge-sequences
(make-cats-table
(insert-missing ls)))])
(let ([xonxoff (list->vector (make-xonxoff wanted))])
(verify xonxoff wanted)
(with-output-to-file "unicode-constituents.ss"
@ -80,7 +175,17 @@
(printf ";;; automatically generated\n")
(printf ";;; ~s elements in vector\n\n" (vector-length xonxoff))
(pretty-print
`(define unicode-constituents-vector ',xonxoff)))
`(define unicode-constituents-vector ',xonxoff))
(printf ";;; ~s elements in cats\n" (length cats-table))
(pretty-print
`(define unicode-categories-lookup-vector
',(list->vector (map car cats-table))))
(pretty-print
`(define unicode-categories-values-vector
',(list->vector (map cdr cats-table))))
(pretty-print
`(define unicode-categories-name-vector
',(list->vector (map car categories)))))
'replace))))

View File

@ -73,3 +73,209 @@
120128 120133 120134 120135 120138 120145 120146 120486 120488 120780
120782 120832 131072 131073 173782 173783 194560 195102 917760 918000
983040 983041 1048573 1048574 1048576 1048577 1114109 1114110))
;;; 1464 elements in cats
(define unicode-categories-lookup-vector
'#(0 32 33 36 37 40 46 48 58 60 63 65 91 97 123 127 160 162 166 168 178 180
188 191 192 215 216 223 247 248 256 311 313 328 330 376 378 382 385 387 390
392 393 396 398 402 403 405 406 409 412 414 415 417 422 424 426 428 430 432
433 436 439 441 443 445 448 452 476 478 495 497 502 505 563 570 572 573 575
577 579 583 591 660 661 688 706 710 722 736 741 750 751 768 880 884 886 890
891 894 895 900 902 904 907 910 912 913 930 931 940 975 976 978 981 984
1007 1012 1017 1019 1021 1072 1120 1155 1159 1160 1162 1216 1218 1230 1232
1300 1329 1367 1369 1370 1376 1377 1416 1419 1425 1470 1473 1475 1476 1478
1480 1488 1515 1520 1523 1525 1536 1540 1547 1548 1550 1552 1558 1563 1564
1566 1568 1569 1595 1600 1601 1611 1631 1632 1642 1646 1648 1649 1748 1750
1757 1759 1765 1767 1769 1770 1774 1776 1786 1789 1791 1792 1806 1810 1840
1867 1869 1902 1920 1958 1969 1970 1984 1994 2027 2036 2038 2039 2042 2043
2305 2307 2308 2362 2364 2366 2369 2377 2381 2382 2384 2385 2389 2392 2402
2404 2406 2416 2417 2427 2432 2434 2436 2437 2445 2447 2449 2451 2473 2474
2481 2483 2486 2490 2492 2494 2497 2501 2503 2505 2507 2509 2511 2519 2520
2524 2526 2527 2530 2532 2534 2544 2546 2548 2554 2555 2561 2563 2565 2571
2575 2577 2579 2601 2602 2609 2610 2612 2613 2615 2616 2618 2620 2622 2625
2627 2631 2633 2635 2638 2649 2653 2655 2662 2672 2674 2677 2689 2691 2693
2702 2703 2706 2707 2729 2730 2737 2738 2740 2741 2746 2748 2750 2753 2758
2759 2761 2763 2765 2766 2768 2769 2784 2786 2788 2790 2800 2802 2817 2818
2820 2821 2829 2831 2833 2835 2857 2858 2865 2866 2868 2869 2874 2876 2881
2884 2887 2889 2891 2893 2894 2902 2904 2908 2910 2911 2914 2918 2928 2930
2946 2949 2955 2958 2961 2962 2966 2969 2971 2974 2976 2979 2981 2984 2987
2990 3002 3006 3008 3009 3011 3014 3017 3018 3021 3022 3031 3032 3046 3056
3059 3065 3067 3073 3076 3077 3085 3086 3089 3090 3113 3114 3124 3125 3130
3134 3137 3141 3142 3145 3146 3150 3157 3159 3168 3170 3174 3184 3202 3204
3205 3213 3214 3217 3218 3241 3242 3252 3253 3258 3260 3264 3269 3271 3273
3274 3276 3278 3285 3287 3294 3296 3298 3300 3302 3312 3313 3315 3330 3332
3333 3341 3342 3345 3346 3369 3370 3386 3390 3393 3396 3398 3401 3402 3405
3406 3415 3416 3424 3426 3430 3440 3458 3460 3461 3479 3482 3506 3507 3516
3518 3520 3527 3530 3531 3535 3538 3541 3544 3552 3570 3572 3573 3585 3633
3634 3636 3643 3647 3648 3654 3655 3663 3664 3674 3676 3713 3715 3717 3719
3721 3723 3725 3726 3732 3736 3737 3744 3745 3748 3752 3754 3756 3757 3761
3762 3764 3770 3771 3773 3774 3776 3781 3784 3790 3792 3802 3804 3806 3840
3841 3844 3859 3864 3866 3872 3882 3892 3902 3904 3912 3913 3947 3953 3967
3968 3973 3974 3976 3980 3984 3992 3993 4029 4030 4038 4039 4045 4047 4048
4050 4096 4130 4131 4136 4137 4139 4141 4145 4147 4150 4152 4154 4160 4170
4176 4182 4184 4186 4256 4294 4304 4347 4349 4352 4442 4447 4515 4520 4602
4608 4681 4682 4686 4688 4695 4698 4702 4704 4745 4746 4750 4752 4785 4786
4790 4792 4799 4802 4806 4808 4823 4824 4881 4882 4886 4888 4955 4959 4961
4969 4989 4992 5008 5018 5024 5109 5121 5741 5743 5751 5760 5761 5787 5789
5792 5867 5870 5873 5888 5901 5902 5906 5909 5920 5938 5941 5943 5952 5970
5972 5984 5997 5998 6001 6002 6004 6016 6068 6070 6071 6078 6086 6087 6089
6100 6103 6104 6107 6110 6112 6122 6128 6138 6144 6150 6151 6155 6158 6160
6170 6176 6211 6212 6264 6272 6313 6314 6400 6429 6432 6435 6439 6441 6444
6448 6450 6451 6457 6460 6464 6465 6468 6470 6480 6510 6512 6517 6528 6570
6576 6593 6600 6602 6608 6618 6622 6624 6656 6679 6681 6684 6686 6688 6912
6916 6917 6964 6966 6971 6973 6978 6979 6981 6988 6992 7002 7009 7019 7028
7037 7424 7468 7522 7544 7545 7579 7616 7627 7678 7680 7829 7836 7840 7930
7936 7944 7952 7958 7960 7966 7968 7976 7984 7992 8000 8006 8008 8014 8016
8024 8032 8040 8048 8062 8064 8072 8080 8088 8096 8104 8112 8117 8118 8120
8124 8127 8130 8133 8134 8136 8140 8141 8144 8148 8150 8152 8156 8157 8160
8168 8173 8176 8178 8181 8182 8184 8188 8189 8191 8192 8203 8208 8214 8216
8219 8221 8224 8232 8234 8239 8240 8249 8251 8255 8257 8260 8263 8274 8277
8287 8288 8292 8298 8304 8306 8308 8314 8317 8320 8330 8333 8336 8341 8352
8374 8400 8413 8417 8418 8421 8432 8448 8450 8451 8455 8456 8458 8459 8462
8464 8467 8470 8473 8478 8484 8490 8494 8496 8500 8501 8505 8506 8508 8510
8512 8517 8518 8522 8524 8526 8527 8531 8544 8579 8581 8592 8597 8602 8604
8608 8609 8611 8612 8614 8615 8622 8623 8654 8656 8658 8661 8692 8960 8968
8972 8992 8994 9001 9003 9084 9085 9115 9140 9180 9186 9192 9216 9255 9280
9291 9312 9372 9450 9472 9655 9656 9665 9666 9720 9728 9839 9840 9885 9888
9907 9985 9989 9990 9994 9996 10024 10025 10060 10063 10067 10070 10072
10079 10081 10088 10102 10132 10133 10136 10160 10161 10175 10176 10181
10183 10187 10192 10214 10220 10224 10240 10496 10627 10649 10712 10716
10748 10750 11008 11035 11040 11044 11264 11311 11312 11359 11362 11365
11367 11373 11380 11382 11384 11392 11491 11493 11499 11513 11517 11518
11520 11558 11568 11622 11631 11632 11648 11671 11680 11687 11688 11695
11696 11703 11704 11711 11712 11719 11720 11727 11728 11735 11736 11743
11776 11778 11782 11785 11790 11799 11800 11804 11806 11904 11930 11931
12020 12032 12246 12272 12284 12288 12289 12292 12306 12308 12318 12320
12321 12330 12336 12337 12342 12344 12347 12350 12352 12353 12439 12441
12443 12445 12447 12449 12539 12540 12543 12544 12549 12589 12593 12687
12688 12690 12694 12704 12728 12736 12752 12784 12800 12831 12832 12842
12868 12880 12881 12896 12928 12938 12977 12992 13055 13056 13312 13313
19893 19894 19904 19968 19969 40891 40892 40960 40981 40982 42125 42128
42183 42752 42775 42779 42784 42786 43008 43010 43011 43014 43015 43019
43020 43043 43045 43047 43048 43052 43072 43124 43128 44032 44033 55203
55204 55296 55297 56191 56193 56319 56321 57343 57345 63743 63744 64046
64048 64107 64112 64218 64256 64263 64275 64280 64285 64287 64297 64298
64311 64312 64317 64320 64322 64323 64325 64326 64434 64467 64830 64832
64848 64912 64914 64968 65008 65020 65022 65024 65040 65047 65050 65056
65060 65072 65073 65075 65077 65093 65095 65097 65101 65104 65107 65108
65112 65119 65122 65124 65127 65130 65132 65136 65141 65142 65277 65279
65281 65284 65285 65288 65294 65296 65306 65308 65311 65313 65339 65345
65371 65380 65382 65392 65393 65438 65440 65471 65474 65480 65482 65488
65490 65496 65498 65501 65504 65506 65509 65511 65513 65517 65519 65529
65532 65534 65536 65548 65549 65575 65576 65595 65596 65598 65599 65614
65616 65630 65664 65787 65792 65794 65795 65799 65844 65847 65856 65909
65913 65930 65931 66304 66335 66336 66340 66352 66369 66370 66378 66379
66432 66462 66464 66500 66504 66512 66513 66518 66560 66600 66640 66718
66720 66730 67584 67590 67592 67594 67638 67639 67641 67644 67645 67647
67648 67840 67862 67866 67871 67872 68096 68097 68100 68101 68103 68108
68112 68116 68117 68120 68121 68148 68152 68155 68159 68160 68168 68176
68185 73728 74607 74752 74851 74864 74868 118784 119030 119040 119079
119082 119141 119143 119146 119149 119155 119163 119171 119173 119180
119210 119214 119262 119296 119362 119365 119366 119552 119639 119648
119666 119808 119834 119860 119886 119893 119894 119912 119938 119964
119966 119968 119970 119971 119973 119975 119977 119981 119982 119990
119994 119997 120004 120005 120016 120042 120068 120070 120071 120075
120077 120085 120086 120093 120094 120120 120122 120123 120127 120128
120133 120135 120138 120145 120146 120172 120198 120224 120250 120276
120302 120328 120354 120380 120406 120432 120458 120486 120488 120513
120514 120539 120540 120546 120571 120572 120597 120598 120604 120629
120630 120655 120656 120662 120687 120688 120713 120714 120720 120745
120746 120771 120772 120778 120780 120782 120832 131072 131073 173782
173783 194560 195102 917505 917506 917536 917632 917760 918000 983040
983041 1048573 1048574 1048576 1048577 1114109 1114110))
(define unicode-categories-values-vector
'#(25 22 17 19 17 #(13 14 17 18 17 12) 17 8 17 18 17 0 #(13 17 14 20 11 20) 1
#(13 18 14 18) 25 #(22 17) 19 21 #(20 21 1 15 18 26 21 20 21 18) 10
#(20 1 21 17 20 10 1 16) 10 17 0 18 0 1 18 1
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) 1 #(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) 1
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1) 0 #(1 0 1 0) 1 0 #(1 0 1) 0 1 0 1 0 1 0 1 0 1 0 1 0
#(1 0 1 0 1) 0 #(1 0) 1 #(0 1) 0 1 0 #(1 0 1) 0 1 #(4 0) 1 4
#(0 2 1 0 2 1 0 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) 1
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) 1 #(0 2 1 0 1) 0
#(1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) 1 0 1 0 1 #(0 1) 0
#(1 0 1 0 1 0 1 0) 1 4 1 3 20 3 20 3 20 3 20 5 29 20 29 3 1 17 29 20
#(0 17) 0 #(29 0 29) 0 1 0 29 0 1 29 1 0 1
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) 1 #(0 1 18 0 1) 0 1 0 1
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 21) 5
29 7
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1) 0 #(1 0 1 0 1 0 1 0 1 0 1 0) 1
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1) 29 0 29 3
17 29 1 #(29 17 12) 29 5 #(17 5 17) 5 17 5 #(17 5) 29 4 29 4 17 29 26 29 19
17 21 5 29 17 29 17 29 4 29 3 4 5 29 8 17 4 5 4 #(17 4) 5 #(26 7) 5 3 5 21
5 4 8 4 21 4 17 #(29 26 4 5) 4 5 29 4 29 4 5 4 29 8 4 5 3 21 17 3 29 5 6 4
29 #(5 4) 6 5 6 5 29 4 5 29 4 5 17 8 17 29 4 #(29 5) 6 29 4 29 4 29 4 29 4
#(29 4) 29 4 29 #(5 4) 6 5 29 6 29 6 #(5 4) 29 6 29 4 29 4 5 29 8 4 19 10
21 29 5 #(6 29) 4 29 4 29 4 29 4 29 4 29 4 29 4 29 #(5 29) 6 5 29 5 29 5 29
4 #(29 4) 29 8 5 4 29 5 #(6 29) 4 29 4 29 4 29 4 29 4 29 4 29 #(5 4) 6 5 29
5 #(6 29) 6 5 29 4 29 4 5 29 8 #(29 19) 29 5 6 29 4 29 4 29 4 29 4 29 4 29
4 29 #(5 4 6 5 6) 5 29 6 29 6 5 29 #(5 6) 29 4 29 4 29 8 #(21 4) 29
#(5 4 29) 4 29 4 29 4 29 4 #(29 4 29) 4 29 4 29 4 29 4 29 6 5 6 29 6 29 6 5
29 6 29 8 10 21 #(19 21) 29 6 29 4 29 4 29 4 29 4 29 4 29 5 6 29 5 29 5 29
5 29 4 29 8 29 6 29 4 29 4 29 4 29 4 29 4 29 #(5 4 6 5) 6 #(29 5) 6 29 6 5
29 6 29 #(4 29) 4 5 29 8 29 21 29 6 29 4 29 4 29 4 29 4 29 6 5 29 6 29 6 5
29 6 29 4 29 8 29 6 29 4 29 4 29 4 #(29 4) 29 4 29 5 29 6 5 #(29 5 29) 6 29
6 17 29 4 5 4 5 29 19 4 3 5 17 8 17 29 4 #(29 4) 29 4 #(29 4) 29 4 29 4 29
4 29 4 #(29 4 29 4) 29 4 29 4 5 4 5 29 5 4 29 4 #(29 3 29) 5 29 8 29 4 29 4
21 17 21 5 21 8 10 #(21 5 21 5 21 5 13 14 13 14) 6 4 29 4 29 5 6 5 17 5 4
29 5 29 5 29 21 5 21 29 21 17 29 4 29 4 29 4 #(29 6) 5 #(6 5) 29 5 #(6 5)
29 8 17 4 6 5 29 0 29 4 #(17 3) 29 4 29 4 29 4 29 4 29 4 29 4 #(29 4 29) 4
29 4 29 4 29 4 29 4 29 4 #(29 4 29) 4 29 4 29 4 29 4 29 4 29 #(5 21) 17 10
29 4 21 29 4 29 4 17 4 29 22 4 #(13 14) 29 4 17 9 29 4 29 4 5 29 4 5 17 29
4 5 29 4 29 4 29 5 29 4 26 6 5 6 5 6 5 17 3 17 #(19 4 5) 29 8 29 10 29 17
12 17 5 #(22 29) 8 29 4 3 4 29 4 5 29 4 29 5 6 5 6 29 6 5 6 5 29 21 29 17 8
4 29 4 29 4 29 6 4 6 29 8 29 17 21 4 5 6 29 17 29 5 6 4 #(5 6) 5 #(6 5) 6 5
6 4 29 8 17 21 5 21 29 1 3 1 3 1 3 5 29 5
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0) 1 29
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1) 29 1 0 1 29 0 29 1 0 1 0 1 29 0 29 1
#(29 0 29 0 29 0 29 0) 1 0 1 29 1 2 1 2 1 2 1 29 1 0 #(2 20 1) 20 1 29 1 0
2 20 1 29 1 0 29 20 1 0 20 29 1 29 1 0 2 20 29 22 26 12 17 #(15 16 13) 15
#(16 13 15) 17 #(23 24) 26 22 17 #(15 16) 17 11 17 #(18 13 14) 17
#(18 17 11) 17 22 26 29 26 #(10 1) 29 10 18 #(13 14 1) 10 18 #(13 14 29) 3
29 19 29 5 7 5 7 5 29 21 0 21 0 21 1 0 1 0 #(1 21 0) 21 0 21
#(0 21 0 21 0 21) 0 #(21 1) 0 1 4 1 21 1 0 18 0 1 #(21 18) 21 1 29 10 9
#(0 1) 29 18 21 18 21 18 21 18 21 18 21 18 21 18 21 #(18 21 18) 21 18 21 18
21 18 21 #(13 14) 21 18 21 18 21 18 21 29 21 29 21 29 10 21 10 21 18 21 18
21 18 21 18 21 29 21 29 21 29 21 29 21 29 21 #(29 21 29) 21 29 #(21 29) 21
29 21 #(13 14 13 14 13 14 13 14 13 14 13 14 13 14) 10 21 29 21 29 21 29 18
#(13 14) 18 29 18 #(13 14 13 14 13 14) 29 18 21 18
#(13 14 13 14 13 14 13 14 13 14 13 14 13 14 13 14 13 14 13 14 13 14) 18
#(13 14 13 14) 18 #(13 14) 18 21 29 21 29 0 29 1 #(29 0 1) 0 1
#(0 1 0 1 0 1) 29 #(1 0) 1 29
#(0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) 1 21 29 17 10 17 1 29
4 29 3 29 4 29 4 29 4 29 4 29 4 29 4 29 4 29 4 29 4 29 17 #(15 16 15 16) 17
#(15 16 17 15 16) 17 12 29 #(15 16) 29 21 29 21 29 21 29 21 29 22 17
#(21 3 4 9 13 14 13 14 13 14 13 14 13 14) 21
#(13 14 13 14 13 14 13 14 12 13) 14 21 9 5 12 3 21 9 #(3 4 17) 21 29 4 29 5
20 3 #(4 12) 4 17 3 4 29 4 29 4 29 21 10 21 4 29 21 29 4 21 29 10 21 29 21
10 21 10 21 10 21 29 21 4 29 4 29 21 4 29 4 29 4 3 4 29 21 29 20 3 29 20 29
4 6 4 5 4 5 4 6 5 6 21 29 4 17 29 4 29 4 29 27 29 27 29 27 29 #(27 28) 29
28 4 29 4 29 4 29 1 29 1 29 #(4 5) 4 18 4 29 4 #(29 4 29) 4 29 4 29 4 29 4
#(13 14) 29 4 29 4 29 4 #(19 21) 29 5 17 #(13 14 17) 29 5 29 17 12 11
#(13 14 13 14 13 14 13 14 13 14 13 14 13 14 13 14) 17 #(13 14) 17 11 17 29
17 #(12 13 14 13 14 13 14) 17 #(18 12) 18 #(29 17 19) 17 29 4 29 4 29
#(26 29) 17 19 17 #(13 14 17 18 17 12) 17 8 17 18 17 0 #(13 17 14 20 11 20)
1 #(13 18 14 18 13 14 17 13 14) 17 4 3 4 3 4 29 4 29 4 29 4 29 4 29 19
#(18 20 21) 19 #(29 21) 18 21 29 26 21 29 4 29 4 29 4 29 4 29 4 29 4 29 4
29 17 21 29 10 29 21 9 10 21 10 29 4 29 10 29 4 9 4 9 29 4 #(29 17) 4 29 4
17 9 29 0 1 4 29 8 29 4 29 #(4 29) 4 29 4 29 4 29 4 29 4 10 29 17 29 4 5 29
5 29 5 4 29 4 29 4 29 5 29 5 10 29 17 29 4 29 9 29 17 29 21 29 21 29 21 6 5
21 6 26 5 21 5 21 5 21 29 21 5 21 29 21 29 10 29 0 1 0 1 29 1 0 1 #(0 29) 0
29 0 29 0 29 0 29 0 1 #(29 1 29) 1 29 1 0 1 0 29 0 29 0 29 0 29 1 0 29 0 29
0 #(29 0) 29 0 29 1 0 1 0 1 0 1 0 1 0 1 0 1 29 0 18 1 18 1 0 18 1 18 1 0 18
1 18 1 0 18 1 18 1 0 18 1 18 1 #(0 1) 29 8 29 4 29 4 29 4 29 26 29 26 29 5
29 28 29 28 29 28 29 28 29))
(define unicode-categories-name-vector
'#(Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po Sm Sc Sk So Zs Zl Zp
Cc Cf Cs Co Cn))