renamed company to client.
This commit is contained in:
@@ -67,13 +67,12 @@
|
||||
[file filename]
|
||||
(excel/parse-file file filename))
|
||||
|
||||
(defn best-match [companies company-identifier]
|
||||
(println companies)
|
||||
(->> companies
|
||||
(map (fn [company]
|
||||
(if-let [matches (:matches company)]
|
||||
[company (apply min (map #(m/jaccard (.toLowerCase company-identifier) %) matches))]
|
||||
[company 1])))
|
||||
(defn best-match [clients client-identifier]
|
||||
(->> clients
|
||||
(map (fn [client]
|
||||
(if-let [matches (:client/matches client)]
|
||||
[client (apply min (map #(m/jaccard (.toLowerCase client-identifier) %) matches))]
|
||||
[client 1])))
|
||||
(filter #(< (second %) 0.25))
|
||||
(sort-by second)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user