Skip to content

Commit 05ec50e

Browse files
committed
updates stop words
1 parent d26b4f7 commit 05ec50e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Clojure-Websockets/src/cljs/birdwatch/wordcount.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"until" "while" "of" "at" "by" "for" "with" "about" "against" "between" "into" "through" "during"
1616
"before" "after" "above" "below" "to" "from" "up" "upon" "down" "in" "out" "on" "off" "over" "under"
1717
"again" "further" "then" "once" "here" "there" "when" "where" "why" "how" "all" "any" "both" "each"
18-
"few" "more" "most" "other" "some" "such" "no" "nor" "not" "only" "own" "same" "so" "than" "too"
19-
"very" "say" "says" "said" "shall" "via" "htt…" "don" "let" "gonna" "rt" "&amp" "http"})
18+
"few" "more" "most" "other" "some" "such" "no" "nor" "not" "only" "own" "same" "so" "than" "too" "come"
19+
"very" "say" "says" "said" "shall" "via" "htt…" "don" "let" "gonna" "rt" "&amp" "http" "must" "see"})
2020

2121
(defn get-words [app n]
2222
(vec (map (fn [w] (let [[k v] w] {:key k :value v})) (take n (:words-sorted-by-count @app)))))
@@ -33,7 +33,7 @@
3333
(filter #(> (count %) 3) ,)
3434
(filter #(< (count %) 25) ,)
3535
(map s/lower-case ,)
36-
(map #(s/replace % #"[;:,/‘’…~\-!?#<>()\"@.]+" "" ) ,)
36+
(map #(s/replace % #"[;:,/‘’…~\-!?\[\]\"<>()\"@.]+" "" ) ,)
3737
(filter (fn [item] (not (contains? stop-words item))) ,)
3838
(map #(add-word app %) ,))))
3939

0 commit comments

Comments
 (0)