Learn practical skills, build real-world projects, and advance your career
Created 4 years ago
Introduction
Topic Modeling is a process to automatically identify topics present in a text object and to derive hidden patterns exhibited by a text corpus. Topic Models are very useful for multiple purposes, including:
- Document clustering
- Organizing large blocks of textual data
- Information retrieval from unstructured text
- Feature selection
Imports
Import libraries and write settings here.
# Data manipulation
import pandas as pd
import numpy as np
# Options for pandas
pd.options.display.max_columns = None
pd.options.display.max_rows = None
pd.options.display.max_colwidth=-1
# Display all cell outputs
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = 'all'
from IPython import get_ipython
ipython = get_ipython()
# autoreload extension
if 'autoreload' not in ipython.extension_manager.loaded:
%load_ext autoreload
%autoreload 2
# Visualizations
import plotly.express as px
import matplotlib.pyplot as plt
import seaborn as sns
import re
import gensim
from gensim import corpora
# libraries for visualization
import pyLDAvis
import pyLDAvis.gensim
Analysis
Load the zomato reviews data
We will load the cleaned data