class_docstr: Visualization Module for Natural Language Processing
  
  Attributes:
      df (pd.DataFrame): Original dataframe to be graphed.
      target_col: Columns to be analyzed that exist in df (assuming type list) e.g. [hoge, fuga, ...]
      output_file_path: path to save the html file of the generated graph
      default_stopwords_file_path: The path to the file that defines the default stopword
class_docstr_tok: ["Visualization","Module","for","Natural","Language","Processing","Attributes",":","df","(","pd.DataFrame",")",":","Original","dataframe","to","be","graphed",".","target_col",":","Columns","to","be","analyzed","that","exist","in","df","(","assuming","type","list",")","e.g",".","[","hoge",",","fuga",",","...","]","output_file_path",":","path","to","save","the","html","file","of","the","generated","graph","default_stopwords_file_path",":","The","path","to","the","file","that","defines","the","default","stopword"]
docstr: Generating the Edge and Node data frames for a graph
  
  Args:
      batches (list): array of word lists
      min_edge_frequency (int): Minimum number of edge occurrences.
                                Edges less than this number will be removed.
  
  Returns:
      None
docstr_tok: ["Generating","the","Edge","and","Node","data","frames","for","a","graph","Args",":","batches","(","list",")",":","array","of","word","lists","min_edge_frequency","(","int",")",":","Minimum","number","of","edge","occurrences",".","Edges","less","than","this","number","will","be","removed",".","Returns",":","None"]
code: def get_edges_nodes(self, batches, min_edge_frequency) -> None:
      """Generating the Edge and Node data frames for a graph
  
      Args:
          batches (list): array of word lists
          min_edge_frequency (int): Minimum number of edge occurrences.
                                    Edges less than this number will be removed.
  
      Returns:
          None
      """
  
      def _ranked_topics(batches):
          """sort function"""
          batches.sort()
          return batches
  
      def _unique_combinations(batches):
          """craeted unique combinations
  
          e.g. [('hoge1', 'hoge2'), ('hoge1', 'hoge3'), ...]
  
          """
          return list(
              itertools.combinations(_ranked_topics(batches), 2)
          )
  
      def _add_unique_combinations(_unique_combinations, _dict):
          """Calculate how many times the combination appears and store it in a dictionary"""
          for combination in _unique_combinations:
              if combination in _dict:
                  _dict[combination] += 1
              else:
                  _dict[combination] = 1
          return _dict
  
      edge_dict = {}
      source = []
      target = []
      edge_frequency = []
      for batch in batches:
          # e.g. {('hoge1', 'hoge2'): 8, ('hoge1', 'hoge3'): 3, ...}
          edge_dict = _add_unique_combinations(
              _unique_combinations(batch), edge_dict
          )
  
      # create edge dataframe
      for key, value in edge_dict.items():
          source.append(key[0])
          target.append(key[1])
          edge_frequency.append(value)
      edge_df = pd.DataFrame(
          {
              "source": source,
              "target": target,
              "edge_frequency": edge_frequency,
          }
      )
      edge_df.sort_values(
          by="edge_frequency", ascending=False, inplace=True
      )
      edge_df.reset_index(drop=True, inplace=True)
      edge_df = edge_df[edge_df["edge_frequency"] > min_edge_frequency]
  
      # create node dataframe
      node_df = pd.DataFrame(
          {
              "id": list(
                  set(list(edge_df["source"]) + list(edge_df["target"]))
              )
          }
      )
      labels = [i for i in range(len(node_df["id"]))]
      node_df.loc[:, "id_code"] = node_df.index
      node_dict = dict(zip(node_df["id"], labels))
  
      edge_df.loc[:, "source_code"] = edge_df["source"].apply(
          lambda x: node_dict[x]
      )
      edge_df.loc[:, "target_code"] = edge_df["target"].apply(
          lambda x: node_dict[x]
      )
  
      self.edge_df = edge_df
      self.node_df = node_df
      self.node_dict = node_dict
      self.edge_dict = edge_dict
  
      return None
  
imports: import os
  import gc
  import itertools
  from io import BytesIO
  from PIL import Image
  from collections import defaultdict, Counter
  import datetime
  import pandas
  import numpy
  from tqdm import tqdm
  from sklearn import preprocessing
  import seaborn
  import plotly
  import plotly.graph_objs
  import plotly.express
  from wordcloud import WordCloud
  import networkx
  from networkx.algorithms import community
label_desc: Use image node_id 7 for calling the NLPlot obj's underlying member method code with example usage: obj.get_edges_nodes(batches, min_edge_frequency) and returns: None, batches, list, _dict