我編輯一些文字,不知道我是否可以編程方式搜索特定的單詞的組合。查找,使用R
這些話:差不多,幾乎,相當,接近和非常不這話未來工作:一定的,完整的,死的,全緣,必不可少的滅絕。
比方說我有這樣的特徵向量:
text <- c("R is a very essential tool for data analysis. While it is regarded as domain specific, it is a very complete programming language. Almost certainly, many people who would benefit from using R, do not use it")
我能得到R返回一個數字矢量,給人行號(或句子號),這些話是放在旁邊對方?
請注意,我用「肯定」,所以最好我需要R鍵搜索包含「一定」或其他單詞,而不是整個單詞「一定」或其他的話。
雞蛋裏挑骨頭星期一:刪除最後一個逗號。 :-) – 2013-04-29 13:14:54