anchor.diff:  (defun classify (input &key (ngram-limit 400)
                               (languages *language-models*)
                               remove-singletons
  -                            (cutoff 1.05))
  +                            (cutoff 1.05)
  +                            (sample-size 20000))
     "Return the language of INPUT.
   
   LANGUAGES is the alist of language models to use; default is
   *LANGUAGE-MODELS*.
  +
  +SAMPLE-SIZE limits the portion of INPUT used to generate the ngram
  +profile to a certain number of characters (default is 20,000, which is
  +plenty). NIL means no limit.
   
   REMOVE-SINGLETONS is either NIL (don't), T (always), or a
   number (above this length). It provides a slight increase in speed for
  
positive.code: 
  If a guess is unlikelier than than CUTOFF times the previous guess, it
  is discarded."
    (let* ((unknown
             (mapcar #'car (create-lm input
                                      :remove-singletons
                                      (if (numberp remove-singletons)
                                          (> (length input) remove-singletons)
                                          remove-singletons))))
           (distances
             (loop for (language . model) in languages
  
negative.code:                  (declare (array-length len))
                   (loop for i of-type array-length from 0 below (length word) do
                     (flet ((get-ngram (j)
                              (let ((ngram (subseq word i (+ i j))))
                                (incf (gethash ngram lm 0)))))
                       (declare (dynamic-extent (function get-ngram)))
                       (when (> len 4)
  