<commit_before>(defpackage "XML")
(in-package "XML")

;;; Misc hooks that attempt to bypass metaslang types.
;;; The user may wish to redefine these to be cognizant of user-defined types.
;;; For example, this may succeed in reading and writing floats
;;; even though metaslang is unaware of them
;;;

(defun XML::WRITE_AD_HOC_STRING-2 (sort-descriptor datum)
  (declare (ignore sort-descriptor))
  (format nil "~S" datum))

(defun  XML::READ_AD_HOC_STRING-2 (sort-descriptor xml-element-content) 
  (declare (ignore sort-descriptor))
  (let (; (items   (car xml-element-content)) 
	(trailer (cdr xml-element-content))) 
    (read-from-string (unicode::|!string| (cdr trailer)))))<commit_msg>changed call to funcall, to avoid compiler warning<commit_after>(defpackage "XML")
(in-package "XML")

;;; Misc hooks that attempt to bypass metaslang types.
;;; The user may wish to redefine these to be cognizant of user-defined types.
;;; For example, this may succeed in reading and writing floats
;;; even though metaslang is unaware of them
;;;

(defun XML::WRITE_AD_HOC_STRING-2 (sort-descriptor datum)
  (declare (ignore sort-descriptor))
  (format nil "~S" datum))

(defun  XML::READ_AD_HOC_STRING-2 (sort-descriptor xml-element-content) 
  (declare (ignore sort-descriptor))
  (let (; (items   (car xml-element-content)) 
	(trailer (cdr xml-element-content))) 
    ;; Unicode.string is defined in /Library/IO/Unicode/UStringAsList.sw
    ;; which is compiled after this...
    (read-from-string (funcall 'unicode::|!string| (cdr trailer)))))
{'fraction_non_alphanumeric': 0.13164721141374838, 'fraction_numerical': 0.0025940337224383916, 'mean_word_length': 4.714814814814815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6258605', 'n_tokens_mistral': 515, 'n_tokens_neox': 488, 'n_words': 159}