<commit_before>;; -*- lisp -*-

(in-package :it.bese.yaclml)

;;;; * Compiling TAL from .tal files

(defclass tal-generator () ())

(defgeneric preprocess-tal (generator name)
  (:documentation "Returns the source code which a certain TAL
  name will expand into. Used for debugging tal code."))

(defgeneric load-tal (generator name))

(defgeneric template-truename (generator name))

(defclass file-system-generator ()
  ((root-directories :initarg :root-directories :type list
		     :accessor root-directories)
   (cachep :initarg :cachep :accessor cachep :initform t)))

(defstruct (tal-template (:conc-name tal-template.))
  last-load-time
  file-name
  function)

(defparameter *tal-templates* (make-hash-table :test 'equal))

(defmethod template-truename ((generator file-system-generator) (name string))
  (template-truename generator (pathname name)))
<commit_msg>Made file-system-generator a subclass of tal-generator.<commit_after>;; -*- lisp -*-

(in-package :it.bese.yaclml)

;;;; * Compiling TAL from .tal files

(defclass tal-generator () ())

(defgeneric preprocess-tal (generator name)
  (:documentation "Returns the source code which a certain TAL
  name will expand into. Used for debugging tal code."))

(defgeneric load-tal (generator name))

(defgeneric template-truename (generator name))

(defclass file-system-generator (tal-generator)
  ((root-directories :initarg :root-directories :type list
		     :accessor root-directories)
   (cachep :initarg :cachep :accessor cachep :initform t)))

(defstruct (tal-template (:conc-name tal-template.))
  last-load-time
  file-name
  function)

(defparameter *tal-templates* (make-hash-table :test 'equal))

(defmethod template-truename ((generator file-system-generator) (name string))
  (template-truename generator (pathname name)))

{'fraction_non_alphanumeric': 0.1314475873544093, 'fraction_numerical': 0.0, 'mean_word_length': 4.690851735015773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2813020', 'n_tokens_mistral': 574, 'n_tokens_neox': 557, 'n_words': 164}