How to build a Term-Document-Matrix from a set of texts and a specific set of terms (tags)?

前端 未结 2 1116
清歌不尽
清歌不尽 2021-02-06 14:18

I have two sets of data:

  • a set of tags (single words like php, html, etc)

  • a set of texts

I wish now

2条回答
  •  执笔经年
    2021-02-06 14:48

    tdm.onlytags <- tdm[rownames(tdm)%in%TagSet$tag,]
    

    to select only your specified words and next proceed with your analysis.

提交回复
热议问题