Less error prone
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
(conj matches name))))
|
||||
(filter #(<= (second %) threshold))
|
||||
(sort-by second)
|
||||
ffirst)
|
||||
first)
|
||||
|
||||
word-set (set (filter (complement str/blank?) (str/split (.toLowerCase invoice-client-name) #"[\s:\-]" )))
|
||||
client-word-match (->> clients
|
||||
@@ -108,7 +108,7 @@
|
||||
(filter (fn [[_ c]] (> c 0)))
|
||||
(sort-by (fn [[_ c]] c))
|
||||
reverse
|
||||
ffirst)]
|
||||
first)]
|
||||
(or fuzzy-match client-word-match))))
|
||||
|
||||
(defn best-location-match [client text full-text]
|
||||
|
||||
Reference in New Issue
Block a user