anchor.diff:           (id (g "id" metadata))
            (children (remove-if-not (lambda (x) (equal (car x) "ph")) (cdr ph)))
            (hd (g "hd" (cddr ph)))
  -         (word (g "w" hd))
  -         (citation-form (g "c" hd))
  -         (sense (g "s" hd))
  +         (word (replace-spaces (g "w" hd)))
  +         (citation-form (replace-spaces (g "c" hd)))
  +         (sense (replace-spaces (g "s" hd)))
            (frame (g "a" hd)))
       (push
  -     (make-instance 'token :id id :form word :lemma citation-form :upostag (car split-features)
  -                    :feats features :head head :deprel slot :misc (format nil "s:~a a:~a" sense frame))
  +     (make-instance 'token :id id :form word :lemma citation-form
  +                    :upostag (car split-features)
  +                    :feats features :head head :deprel slot
  +                    :misc (format nil "s:~a a:~a" sense frame))
        (sentence-tokens sentence))
       (dolist (c children) (ph c id sentence)))
     sentence)
  
positive.code: (defun g (key list)
    (cadr (assoc key list :test #'equal)))
  
  (defun ph (ph head sentence)
    (let* ((metadata (cadr ph))
           (features (g "f" metadata))
  
negative.code:   (let ((sentence (make-instance 'sentence))
          (metadata (cadr seg))
          (top (caddr seg)))
      (ph top 0 sentence)
      (setf (sentence-meta sentence) (pairlis '("text") `(,(g "text" metadata))))
      (setf (sentence-tokens sentence) (reorder-punctuation (sort (sentence-tokens sentence) #'< :key #'num-token-id)))
      sentence))
  
  (defun process-esg (infile outfile)
    (with-open-file (in infile)
      (let ((sentences (mapcar #'segment (cddr (xmls:parse in)))))
        (write-conllu sentences outfile))))
  
  