Posts

Showing posts from July, 2019

Simple Intro About Bag Of Words with Python(BOW)

Image
** Reference: Whole post was copied from this site to keep a note Bag of Words (BOW) is a method to extract features from text documents . These features can be used for training machine learning algorithms. It creates a vocabulary of all the unique words occurring in all the documents in the training set. Following image describe it's steps: Generated vectors can be input to your machine learning algorithm. Let’s start with an example to understand by taking some sentences and generating vectors for those. Consider the below two sentences. 1. "John likes to watch movies. Mary likes movies too." 2. "John also likes to watch football games." These two sentences can be also represented with a collection of words. 1. ['John', 'likes', 'to', 'watch', 'movies.', 'Mary', 'likes', 'movies', 'too.'] 2. ['John', 'also', 'likes', 'to', '...