class_docstr: Class for node embedding based dynamic graph construction.
class_docstr_tok: ["Class","for","node","embedding","based","dynamic","graph","construction","."]
docstr: Convert raw text data to the initial node set graph (i.e., no edge information).
  
  Parameters
  ----------
  raw_text_data : str or list/tuple of str
      The raw text data. When a list/tuple of tokens is provided, no
      tokenization will be conducted and each token is a node;
      otherwise, tokenization will be conducted on the input string
      to get a list of tokens.
  lower_case : boolean
      Specify whether to lower case the input text, default: ``True``.
  tokenizer : callable, optional
      The tokenization function.
  
  Returns
  -------
  GraphData
      The constructed graph.
docstr_tok: ["Convert","raw","text","data","to","the","initial","node","set","graph","(","i.e.",",","no","edge","information",")",".","Parameters","--","--","--","--","--","raw_text_data",":","str","or","list\/tuple","of","str","The","raw","text","data",".","When","a","list\/tuple","of","tokens","is","provided",",","no","tokenization","will","be","conducted","and","each","token","is","a","node",";","otherwise",",","tokenization","will","be","conducted","on","the","input","string","to","get","a","list","of","tokens",".","lower_case",":","boolean","Specify","whether","to","lower","case","the","input","text",",","default",":","``","True","``",".","tokenizer",":","callable",",","optional","The","tokenization","function",".","Returns","--","--","--","-","GraphData","The","constructed","graph","."]
code: def init_topology(
      cls, raw_text_data, lower_case=True, tokenizer=word_tokenize
  ):
      """Convert raw text data to the initial node set graph (i.e., no edge information).
  
      Parameters
      ----------
      raw_text_data : str or list/tuple of str
          The raw text data. When a list/tuple of tokens is provided, no
          tokenization will be conducted and each token is a node;
          otherwise, tokenization will be conducted on the input string
          to get a list of tokens.
      lower_case : boolean
          Specify whether to lower case the input text, default: ``True``.
      tokenizer : callable, optional
          The tokenization function.
  
      Returns
      -------
      GraphData
          The constructed graph.
      """
      if isinstance(raw_text_data, str):
          token_list = tokenizer(raw_text_data.strip())
      elif isinstance(raw_text_data, (list, tuple)):
          token_list = raw_text_data
      else:
          raise RuntimeError(
              "raw_text_data must be str or list/tuple of str"
          )
  
      graph = GraphData()
      graph.add_nodes(len(token_list))
  
      for idx in range(len(token_list)):
          graph.node_attributes[idx]["token"] = (
              token_list[idx].lower() if lower_case else token_list[idx]
          )
  
      return graph
  
file_path: graph4nlp/graph4nlp/pytorch/modules/graph_construction/node_embedding_based_graph_construction.py
imports: import torch
  from nltk.tokenize import word_tokenize
  from ...data.data import GraphData
  from ..utils.generic_utils import normalize_adj
  from ..utils.vocab_utils import Vocab
  from .base import DynamicGraphConstructionBase
  from .utils import convert_adj_to_graph
label_desc: Use image node_id 3 for calling the NodeEmbeddingBasedGraphConstruction obj's underlying member method code with example usage: obj.init_topology(cls, raw_text_data, lower_case, tokenizer) and returns: graph