for better or worse, moving to localized events and subs.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user