replying to emails
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
[clojure.string :as str]
|
||||
[clojure.java.shell :as sh]
|
||||
[auto-ap.parse.excel :as excel]
|
||||
[auto-ap.parse.templates :as t]))
|
||||
[auto-ap.parse.templates :as t]
|
||||
[clj-fuzzy.metrics :as m]
|
||||
))
|
||||
|
||||
|
||||
|
||||
@@ -50,3 +52,12 @@
|
||||
"xlsx"
|
||||
[file filename]
|
||||
(excel/parse-file file filename))
|
||||
|
||||
(defn best-match [companies company-identifier]
|
||||
(->> companies
|
||||
(map (fn [company]
|
||||
[company (apply min (map #(m/jaccard (.toLowerCase company-identifier) %) (:matches company)))]))
|
||||
(filter #(< (second %) 0.25))
|
||||
(sort-by second)
|
||||
|
||||
ffirst))
|
||||
|
||||
Reference in New Issue
Block a user