The cloud natural language API can be implemented to perform sentiment analysis function in order to search fiction books from a set of books. The steps to perform the same are as follows:
- Input the text (the dataset is books; it is available at https://github.com/zygmuntz/goodbooks-10k)
- Extract the syntax
- Sentiment analysis API
- Generate fiction (positive) or non-fiction books (negative) results
- Calculate the overall sentiment by adding positive and negative results, is prediction