more specs.

This commit is contained in:
Bryce Covert
2018-04-09 16:27:03 -07:00
parent f7dea19d2e
commit 5e7add409f
25 changed files with 246 additions and 209 deletions

View File

@@ -1,11 +1,9 @@
(ns auto-ap.parse
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.java.shell :as sh]
[auto-ap.parse.excel :as excel]
(:require [auto-ap.parse.excel :as excel]
[auto-ap.parse.templates :as t]
[clj-fuzzy.metrics :as m]
))
[clojure.java.shell :as sh]
[clojure.string :as str]))
@@ -54,6 +52,7 @@
(excel/parse-file file filename))
(defn best-match [companies company-identifier]
(println companies)
(->> companies
(map (fn [company]
[company (apply min (map #(m/jaccard (.toLowerCase company-identifier) %) (:matches company)))]))