returns a set of the unique n-grams in a string.
this is using actual sets here, discards dupicate n-grams?
(defn n-grams
"returns a set of the unique n-grams in a string.
this is using actual sets here, discards dupicate n-grams?
"
[n s]
(into
#{}
(map
#(apply str %)
(partition n 1 s))))
Comments top
No comments for n-grams. Log in to add a comment.