<commit_before>(ns dwc-rest.core
  (:use dwc.csv)
  (:use dwc.xlsx)
  (:use dwc.json)
  (:use dwc.geojson)
  (:use dwc.archive))

(def reader
  {:csv read-csv
   :xlsx read-xlsx
   :json read-json
   :geojson read-geojson
   :dwca read-archive})

(def writer
  {:json write-json
   :geojson write-geojson})

(defn str-to-file
  [data] 
   (let [tmp (java.io.File/createTempFile "dwc-" ".tmp")]
     (spit tmp data)
     (.getAbsolutePath tmp)))

(defn convert
  [{from :from to :to source :source}]
   ((get writer (keyword to ))
     ((get reader (keyword from )) source)))

<commit_msg>archive==dwca<commit_after>(ns dwc-rest.core
  (:use dwc.csv)
  (:use dwc.xlsx)
  (:use dwc.json)
  (:use dwc.geojson)
  (:use dwc.archive))

(def reader
  {:csv read-csv
   :xlsx read-xlsx
   :json read-json
   :geojson read-geojson
   :dwca read-archive
   :archive read-archive})

(def writer
  {:json write-json
   :geojson write-geojson})

(defn str-to-file
  [data] 
   (let [tmp (java.io.File/createTempFile "dwc-" ".tmp")]
     (spit tmp data)
     (.getAbsolutePath tmp)))

(defn convert
  [{from :from to :to source :source}]
   ((get writer (keyword to ))
     ((get reader (keyword from )) source)))


{'fraction_non_alphanumeric': 0.16319733555370525, 'fraction_numerical': 0.0, 'mean_word_length': 3.074576271186441, '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': '7519203', 'n_tokens_mistral': 487, 'n_tokens_neox': 469, 'n_words': 122}