text mining techniques during our upcoming case study we'll tackle the problem of text classificationautomatically classifying uncategorized texts into specific categories to get from raw textual data to our final destination we'll need few data mining techniques that require background information for us to use them effectively the first important concept in text mining is the "bag of words bag of words to build our classification model we'll go with the bag of words approach bag of words is the simplest way of structuring textual dataevery document is turned into word vector if certain word is present in the vector it' labeled "true"the others are labeled "falsefigure shows simplified example of thisin case there are only two documentsone about the television show game of thrones and one about data science the two word vectors together form the document-term matrix the document-term matrix holds column for every term and row for every document the values are yours to decide upon in this we'll use binaryterm is presenttrue or false game of thrones is great television series but the books are better doing data science is more fun than watching television [({'game':true,'of':true,'thrones':true,'is':true,' ':true'great':true,'television':true,'series':true,'but':true'the':true,'books':true,'are':true,'better':true,'doing'false'data':false,'science':false,'more':false,'fun':false'than':false,'watching':false}'gameofthrones')({'doing':true,'data':true,'science':true,'is':true,'more'true,'fun':true,'than':true,'watching':true,'television':true'game':false,'of':false,'thrones':false,' ':false,'great'false,'series':false,'but':false,'the':false,'books':false'are':false,'better':false}'datascience')figure text is transformed into bag of words by labeling each word (termwith "trueif it is present in the document and "falseif not the example from figure does give you an idea of the structured data we'll need to start text analysisbut it' severely simplifiednot single word was filtered out and no stemming (we'll go into this laterwas applied big corpus can have thousands of unique words if all have to be labeled like this without any filteringit' easy to see we might end up with large volume of data binary coded bag of words as shown in figure is but one way to structure the dataother techniques exist