        (map #(str/split % #"\t"))))
 
 (defn- tsv->tx-data [path namespace]
-  "Takes as input a tsv (tab-separated values) file with attribue names
+  "Takes as input a tsv (tab-separated values) file with attribute names
   on the first line and the actual model data on the following lines.
   Returns a Datomic transaction data seq that can be fed directly into
   datomic.api/transact."

                                   unique-vals)]
      (when-not (= (first headers) "tid")
        (throw (Exception. (str "The first column should be tid, not " (first headers) "!"))))
      (for [row data
            :let [[tid & fields] row]]
        (map (fn [header value]
               {:db/id (d/tempid :db.part/glossa)
                :metadata_value value})
             headers fields))
      (create-metadata-value-maps val-id-maps headers categories))))

              (filter #(seq (val %)) (zipmap attr-names row))))  ;ignore empty strings
      {:from-path path})))

(defn- connect-metadata-vals-to-cats [val-id-maps headers categories]
  "Creates metadata values in Datomic and connects them to their metadata categories"
  (mapcat (fn [category-vals header]
            (let [category (first (filter #(= (:metadata-category/short-name %) header)
                                          categories))]
