{"id":1895,"date":"2019-04-30T21:36:47","date_gmt":"2019-04-30T21:36:47","guid":{"rendered":"https:\/\/www.codeastar.com\/?p=1895"},"modified":"2019-05-15T19:30:45","modified_gmt":"2019-05-15T19:30:45","slug":"word-embedding-in-nlp-and-python-part-1","status":"publish","type":"post","link":"https:\/\/www.codeastar.com\/word-embedding-in-nlp-and-python-part-1\/","title":{"rendered":"Word Embedding in NLP and Python – Part 1"},"content":{"rendered":"\n
We have handled text in machine learning using TFIDF<\/a>. And we can use it to build word cloud<\/a> for analytic purpose. But is it the capability of a machine can do on text? Definitely not, as we just haven’t let machine to “learn” about text yet. TFIDF is a statistics process, while we want a machine to learn the correlation of text. So a machine can read and<\/strong> understand texts like a human does, we call it Natural Language Processing (NLP<\/a>). We can think about that, we teach TFIDF to a machine in a Mathematics class. This time, we teach a machine in a Linguistics class. And our first lesson will be — word embedding. <\/p>\n\n\n\n\n\n\n\n When we read a word, “apple”, we may think of a reddish fruit, a pie ingredient or even a technology company. We have such thinking because we have learnt from class or experienced from our daily life. For a machine, “apple” is just a five-character length word. In fact, it is a bunch of 0 and 1 from a machine’s point of view.<\/p>\n\n\n\nWord in machine’s POV<\/h3>\n\n\n\n