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: Plots of WordCloud
  
  Args:
      width (int, optional): width of the graph. Defaults to 800.
      height (int, optional): height of the graph. Defaults to 500.
      max_words (int, optional): Number of words to display. Defaults to 100.
      max_font_size (int, optional): Size of words to be displayed. Defaults to 80.
      stopwords (list, optional): A list of words to specify for the stopword.. Defaults to [].
      colormap (str, optional): cf.https://karupoimou.hatenablog.com/entry/2019/05/17/153207. Defaults to None.
      mask_file (str, optional): Image to be masked file. Defaults to None.
      save (bool, optional): Whether or not to save the Image file. Defaults to False.
  
  Returns:
      WordCloud
docstr_tok: ["Plots","of","WordCloud","Args",":","width","(","int",",","optional",")",":","width","of","the","graph",".","Defaults","to","800.","height","(","int",",","optional",")",":","height","of","the","graph",".","Defaults","to","500.","max_words","(","int",",","optional",")",":","Number","of","words","to","display",".","Defaults","to","100.","max_font_size","(","int",",","optional",")",":","Size","of","words","to","be","displayed",".","Defaults","to","80.","stopwords","(","list",",","optional",")",":","A","list","of","words","to","specify","for","the","stopword","..","Defaults","to","[","]",".","colormap","(","str",",","optional",")",":","cf.https",":","\/\/karupoimou.hatenablog.com\/entry\/2019\/05\/17\/153207",".","Defaults","to","None",".","mask_file","(","str",",","optional",")",":","Image","to","be","masked","file",".","Defaults","to","None",".","save","(","bool",",","optional",")",":","Whether","or","not","to","save","the","Image","file",".","Defaults","to","False",".","Returns",":","WordCloud"]
code: def wordcloud(
      self,
      width: int = 800,
      height: int = 500,
      max_words: int = 100,
      max_font_size: int = 80,
      stopwords: list = [],
      colormap: str = None,
      mask_file: str = None,
      save: bool = False,
  ) -> WordCloud:
      """Plots of WordCloud
  
      Args:
          width (int, optional): width of the graph. Defaults to 800.
          height (int, optional): height of the graph. Defaults to 500.
          max_words (int, optional): Number of words to display. Defaults to 100.
          max_font_size (int, optional): Size of words to be displayed. Defaults to 80.
          stopwords (list, optional): A list of words to specify for the stopword.. Defaults to [].
          colormap (str, optional): cf.https://karupoimou.hatenablog.com/entry/2019/05/17/153207. Defaults to None.
          mask_file (str, optional): Image to be masked file. Defaults to None.
          save (bool, optional): Whether or not to save the Image file. Defaults to False.
  
      Returns:
          WordCloud
      """
  
      f_path = TTF_FILE_NAME
      if mask_file is not None:
          mask = np.array(Image.open(mask_file))
      else:
          mask = None
  
      text = self.df[self.target_col]
      stopwords += self.default_stopwords
  
      wordcloud = WordCloud(
          background_color="white",
          font_step=1,
          contour_width=0,
          contour_color="steelblue",
          font_path=f_path,
          stopwords=stopwords,
          max_words=max_words,
          max_font_size=max_font_size,
          random_state=42,
          width=width,
          height=height,
          mask=mask,
          collocations=False,
          prefer_horizontal=1,
          colormap=colormap,
      )
      wordcloud = wordcloud.generate(
          " ".join(list(itertools.chain(*list(text))))
      )
  
      if save:
  
          def save_array(img):
              stream = BytesIO()
              if save:
                  date = str(
                      pd.to_datetime(datetime.datetime.now())
                  ).split(" ")[0]
                  filename = date + "_wordcloud.png"
                  Image.fromarray(img).save(
                      self.output_file_path + filename
                  )
              Image.fromarray(img).save(stream, "png")
  
          img = wordcloud.to_array()
          save_array(img)
  
      return wordcloud
  
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 6 for calling the NLPlot obj's underlying member method code with example usage: obj.wordcloud(width, height, max_words, max_font_size, stopwords, colormap, mask_file, save) and returns: wordcloud