Base word stemming instead of root word stemming in R

前端 未结 4 453
离开以前
离开以前 2021-02-05 18:10

Is there any way to get base word instead of root word in stemming using NLP in R?

Code:

> #Loading libraries
> library(tm)
> library(slam)
>         


        
4条回答
  •  爱一瞬间的悲伤
    2021-02-05 18:29

    stemCompletion could be used here. It's not the best one but manageable.

    Stemm = tm_map(Txt, stemCompletion, dictionary=Txtt)
    inspect(Stemm)
    
    A corpus with 2 text documents
    
    The metadata consists of 2 tag-value pairs and a data frame
    Available tags are:
      create_date creator 
    Available variables in the data frame are:
      MetaID 
    
    [[1]]
    happyness happies happies
    
    [[2]]
    sky sky
    

提交回复
热议问题