The PHP implementation of TextCat has some of the features (switches -a, -u; var $top and $max) in the runner script rather than the main module, and should be moved so ambiguity detection happens inside TextCat proper.
The Perl version also has some additional command line features the PHP version lacks, Those should be added to the PHP version, too.
Also need to double check that the Cirrus calls to TextCat will be correct after the refactor.