There's more...

In this recipe, we have the base of what a keyword search would do. It is important to understand the difference between topic modelling and keyword search. In a keyword search, we try to associate a phrase with a given document based on the occurrences. In this case, we will point the user to a set of documents that has the most number of occurrences.

Get Apache Spark 2.x Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.