<commit_before>;;;; Conversion from provisional designation to UMPNS

(defpackage :info.isoraqathedh.umpns
  (:use :cl)
  (:nicknames :umnps ; <= Common Typo
   :umpns))
(in-package :umpns)

(defun packed-form-p (string)
  "Checks if a string is a packed form or not."
  ;; Change to regex when convenient
  (and (= 7 (length string))
       (find (char string 0) "IJK")
       (digit-char-p (char string 1))
       (digit-char-p (char string 2))
       (find (char string 3) "ABCDEFGHJKLMNOPQRSTUVWXY")
       (alphanumericp (char string 4))
       (digit-char-p (char string 5))
       (find (char string 6) "ABCDEFGHJKLMNOPQRSTUVWXYZ")))

(defun packed-form-year (packed-form)
  "Retrieves the year of discovery from the packed form."
  (+ (ecase (char packed-form 0)
       (#\I 1800)
       (#\J 1900)
       (#\K 2000))
     (parse-integer (subseq packed-form 1 3))))
<commit_msg>Convert to JPEG<commit_after>;;;; Conversion from provisional designation to UMPNS

(defpackage :info.isoraqathedh.umpns
  (:use :cl)
  (:nicknames :umnps ; <= Common Typo
   :umpns))
(in-package :umpns)

(defun packed-form-p (string)
  "Checks if a string is a packed form or not."
  (cl-ppcre:scan "^[IJK][0-9][0-9][A-HJ-Y][A-Za-z0-9][0-9][A-HJ-Z]$" string))

(defun packed-form-year (packed-form)
  "Retrieves the year of discovery from the packed form."
  (+ (ecase (char packed-form 0)
       (#\I 1800)
       (#\J 1900)
       (#\K 2000))
     (parse-integer (subseq packed-form 1 3))))

{'fraction_non_alphanumeric': 0.15337837837837837, 'fraction_numerical': 0.031081081081081083, 'mean_word_length': 3.136871508379888, 'pattern_counts': {'":': 0, '<': 5, '<?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': '809491', 'n_tokens_mistral': 611, 'n_tokens_neox': 540, 'n_words': 161}