Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (def sentences
- (->> (-> (slurp "http://www.news.com") ; open url
- (strip-html) ; remove html
- (str/split #"[.!?]")) ; split by sentence
- ; feed through LC, trim and split by word, resulting a vector
- (map (comp #(str/split % #"\s+") str/trim str/lower-case))
- (into #{}) ; pack to hashmap
- ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement