【发布时间】:2011-02-02 23:08:35
【问题描述】:
我想做的事(在 Clojure 中):
例如,我有一个需要删除的单词向量:
(def forbidden-words [":)" "the" "." "," " " ...many more...])
... 和一个字符串向量:
(def strings ["the movie list" "this.is.a.string" "haha :)" ...many more...])
因此,应该从每个字符串中删除每个禁用词,在这种情况下,结果将是:[“movie list”“thisisastring”“haha”]。
如何做到这一点?
【问题讨论】:
标签: string clojure stop-words