Text as Data
摘要
This chapter discusses the use of text as dataText as data, introducing the bag of wordsBag of words model and its applications in text analysis. It covers topics such as tokenizationTokenization, stopwordsStopwords, stemmingStemming, and the Document Term Matrix (DTMDocument Term Matrix (DTM)). The chapter also explores term frequencyTerm frequency and tf-idfTf-idf, text regressionText regression, sentiment analysisSentiment analysis, and topic modeling, providing examples in R to illustrate these techniques. It highlights the potential of text data in providing valuable insights for business applications.