for better or worse, moving to localized events and subs.

This commit is contained in:
Bryce Covert
2018-04-12 21:37:27 -07:00
parent 78ced354de
commit e1e0835bee
5 changed files with 120 additions and 53 deletions

View File

@@ -52,9 +52,12 @@
(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 (:data company))))]))
(if-let [matches (:matches (:data company))]
[company (apply min (map #(m/jaccard (.toLowerCase company-identifier) %) matches))]
[company 1])))
(filter #(< (second %) 0.25))
(sort-by second)