A pair of filters converting between Big-5 and a 7-bit ISO-2022 encoding using CNS. Usage: b5cns CNS-file cnsb5 Big5-file IMPLEMENTATION DETAILS: A pair of functions to convert between Big5 and CNS are constructed from mapping data in the file MAP, which has the following fields: 1) Big-5 start 2) Big-5 finish 3) direction (<- -> or <->) 4) CNS start 5) CNS finish 6) frequency The idea is to produce a tree of if's with the most frequently encountered cases requiring fewer tests, to mimimize the average work required over a typical file. That is, we want a weight-balanced tree; the Hu-Tucker algorithm (see e.g. Knuth 6.2.2) is used. BUGS: - I haven't tested them very thoroughly - the frequencies in the MAP are not very accurate (so the mapping may be slower than possible). -- Ross Paterson Department of Computing, Imperial College, London SW7