From the course: Complete Guide to NLP with R

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Associated terms

Associated terms

- [Instructor] In our research with natural language processing, it might be helpful to understand what terms are associated, what terms are similar, and one way that we can assume that a term is similar is by looking at how often they appear together. So for example, crisp might often appear with apple or wet might appear with ocean. Those two terms would be correlated. The TM package provides us with a couple of commands to simplify this type of research. Let's take a look at how to do that. In lines three, I bring in the TM package. And then in line six and seven, I bring in both the poet DTM and the poet corpus. Now we're all set to do Find Associates, which is what I have set up in line 12. Find Associates is a command provided by the TM package. I give it a DTM. And I give it some terms that I'm trying to correlate with. In this case, I've chosen love, hate, and child, but this will differ depending on your…

Contents