 : remove-exclusions ( alist -- alist )
     exclusions [ dup ] H{ } map>assoc assoc-diff ;
 
-: process-canonical ( data -- hash2 hash )
+: process-canonical ( data -- hash hash )
     (process-decomposed) [ first* ] filter
     [
         [ second length 2 = ] filter remove-exclusions
-        ! using 1009 as the size, the maximum load is 4
-        [ first2 first2 rot 3array ] map 1009 alist>hash2
+        [ first2 >2ch swap ] H{ } assoc-map-as
     ] [ >hashtable chain-decomposed ] bi ;
 
 : process-compatibility ( data -- hash )

! See http://factorcode.org/license.txt for BSD license.
USING: combinators.short-circuit assocs math kernel sequences
io.files hashtables quotations splitting grouping arrays io
math.parser hash2 math.order byte-arrays namespaces
compiler.units parser io.encodings.ascii values interval-maps
ascii sets combinators locals math.ranges sorting make
strings.parser io.encodings.utf8 memoize simple-flat-file ;

} cleave

: postprocess-class ( -- )
    combine-map keys [ 2ch> nip ] map
    [ combining-class not ] filter
    [ 0 swap class-map set-at ] each ;

