R tutorial: What is text mining?

Ted walks through text mining as extracting insights from huge text collections. He breaks it into six steps from problem definition to conclusions, then explains two approaches: semantic parsing, which keeps word order, and Bag-of-Words, which treats words as unordered attributes. The course focuses on Bag-of-Words with a later case study comparing Google and Amazon.
Chapters
Hi, I'm Ted. I'm the instructor for this intro text mining course. Let's kick things off by defining text mining and quickly covering two text mining approaches. Academic text mining definitions are long, but I prefer a more practical approach. So text mining is simply the process of distilling actionable insights from text. Here we have a satellite image of San Diego overlaid with social media pictures and traffic information for the roads. It is simply too much information to help you navigate around town. This is like a bunch of text that you couldn't possibly read and organize quickly, like a million tweets or the entire works of Shakespeare. You're just drinking from a fire hose. So in this example, if you need directions to get around San Diego, you need to reduce the information in the map. Text mining works in the same way you can text mine a bunch of tweets or all of Shakespeare to reduce the information. Just like this map. Reducing the information helps you navigate and draw out the important features. This is a text mining workflow. After defining your problem statement, you transition from an unorganized state to an organized state, finally reaching an insight. In chapter four you will use this in a case study comparing Google and Amazon. The text mining workflow can be broken into six distinct components. Each step is important and helps to ensure you have a smooth transition from the organized state to an organized state. This helps you stay organized and increases your chances of a meaningful output. The first step involves problem definition. This lays the foundation for your text mining project. Next is defining the text you will use as your data. As with any analytical project, it is important to understand the medium and data integrity because these can affect outcomes. Next, you organize the text, maybe by author or chronologically. Step four is feature extraction. This can be calculating sentiment or or in our case, extracting word tokens into various matrices. Step five is to perform some analysis. This course will show you some basic analytical methods that can be applied to text. Lastly, step six is the one in which you hopefully answer your problem questions, reach an insight or conclusion, or in the case of predictive modeling, produce an output. Now let's learn about two approaches to text mining. The first is semantic parsing based on word syntax. In semantic parsing, you care about word type and order. This method creates a lot of features to study. For example, a single word can be tagged as part of a sentence, then a noun, and also a proper noun or named entity. So that single word has three features associated with it. This effect makes semantic parsing feature rich. To do the tagging, semantic parsing follows a tree structure to continually break up the text. In contrast, the Bag of Words method doesn't care about word type or order. Here, words are just attributes of the document. In this example, we parse the sentence Steph Curry missed a tough shot. In the semantic example, you see how the words are broken down from the sentence to the noun and verb phrases, and ultimately into unique attributes. Bag of Words treats each term as a single token in the sentence, no matter the type or order. For this introductory course, we'll focus on Bag of Words, but we'll cover more advanced methods in a later course. Let's get a quick taste of text mining.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







