class_docstr:     Line based graph construction class
  Parameters
  ----------
  embedding_style: dict
      Specify embedding styles including ``word_emb_type``, ``node_edge_level_emb_type``
      and ``graph_level_emb_type``.
  vocab: VocabModel
      Vocabulary including all words appeared in graphs.
class_docstr_tok: ["Line","based","graph","construction","class","Parameters","--","--","--","--","--","embedding_style",":","dict","Specify","embedding","styles","including","``","word_emb_type","``",",","``","node_edge_level_emb_type","``","and","``","graph_level_emb_type","``",".","vocab",":","VocabModel","Vocabulary","including","all","words","appeared","in","graphs","."]
docstr:     Graph building method.
  Parameters
  ----------
  raw_text_data: str or list[list]
      Raw text data, it can be multi-sentences.
      When it is ``str`` type, it is the raw text.
      When it is ``list[list]`` type, it is the tokenized token lists.
  nlp_processor: StanfordCoreNLP
      NLP parsing tools
  merge_strategy: None or str, option=[None, "tailhead", "sequential", "user_define"]
      Strategy to merge sub-graphs into one graph
      ``None``: It will be the default option. We will do as ``"tailhead"``.
      ``"tailhead"``: Link the sub-graph  ``i``'s tail node with ``i+1``'s head node
      ``"sequential"``: If sub-graph has ``a1, a2, ..., an`` nodes, and sub-graph has
      ``b1, b2, ..., bm`` nodes. We will link ``a1, a2``, ``a2, a3``, ..., ``an-1, an``,                               ``an, b1``, ``b1, b2``, ..., ``bm-1, bm``.
      ``"user_define"``: We will give this option to the user. User can override this
      method to define your merge strategy.
  edge_strategy: None or str, option=[None, "homogeneous", "heterogeneous", "as_node"]
      Strategy to process edge.
      ``None``: It will be the default option. We will do as ``"homogeneous"``.
      ``"homogeneous"``: We will drop the edge type information.
                         If there is a linkage among node ``i`` and node ``j``, we will add an
                         edge whose weight is ``1.0``. Otherwise there is no edge.
      ``heterogeneous``: We will keep the edge type information.
                         An edge will have type information like ``n_subj``.
      ``as_node``: We will view the edge as a graph node.
                   If there is an edge whose type is ``k`` between node ``i`` and node ``j``,
                   we will insert a node ``k`` into the graph and link node (``i``, ``k``)
                   and (``k``, ``j``).
  split_hyphenated: bool, default=False
      Whether or not to tokenize segments of hyphenated words separately (“school” “-“ “aged”,
      “frog” “-“ “lipped”)
  normalize: bool, default=False
      Whether to convert bracket (`(`) to  -LRB-, and etc.
  sequential_link: bool, default=True
      Whether to link node tokens sequentially (note that it is bidirectional)
  verbose: int, default=0
      Whether to output log infors. Set 1 to output more infos.
  Returns
  -------
  joint_graph: GraphData
      The merged graph data-structure.
docstr_tok: ["Graph","building","method",".","Parameters","--","--","--","--","--","raw_text_data",":","str","or","list","[","list","]","Raw","text","data",",","it","can","be","multi-sentences",".","When","it","is","``","str","``","type",",","it","is","the","raw","text",".","When","it","is","``","list","[","list","]","``","type",",","it","is","the","tokenized","token","lists",".","nlp_processor",":","StanfordCoreNLP","NLP","parsing","tools","merge_strategy",":","None","or","str",",","option=","[","None",",","``","tailhead","''",",","``","sequential","''",",","``","user_define","''","]","Strategy","to","merge","sub-graphs","into","one","graph","``","None","``",":","It","will","be","the","default","option",".","We","will","do","as","``","``","tailhead","''","``",".","``","``","tailhead","''","``",":","Link","the","sub-graph","``","i","``","'s","tail","node","with","``","i+1","``","'s","head","node","``","``","sequential","''","``",":","If","sub-graph","has","``","a1",",","a2",",","...",",","an","``","nodes",",","and","sub-graph","has","``","b1",",","b2",",","...",",","bm","``","nodes",".","We","will","link","``","a1",",","a2","``",",","``","a2",",","a3","``",",","...",",","``","an-1",",","an","``",",","``","an",",","b1","``",",","``","b1",",","b2","``",",","...",",","``","bm-1",",","bm","``",".","``","``","user_define","''","``",":","We","will","give","this","option","to","the","user",".","User","can","override","this","method","to","define","your","merge","strategy",".","edge_strategy",":","None","or","str",",","option=","[","None",",","``","homogeneous","''",",","``","heterogeneous","''",",","``","as_node","''","]","Strategy","to","process","edge",".","``","None","``",":","It","will","be","the","default","option",".","We","will","do","as","``","``","homogeneous","''","``",".","``","``","homogeneous","''","``",":","We","will","drop","the","edge","type","information",".","If","there","is","a","linkage","among","node","``","i","``","and","node","``","j","``",",","we","will","add","an","edge","whose","weight","is","``","1.0","``",".","Otherwise","there","is","no","edge",".","``","heterogeneous","``",":","We","will","keep","the","edge","type","information",".","An","edge","will","have","type","information","like","``","n_subj","``",".","``","as_node","``",":","We","will","view","the","edge","as","a","graph","node",".","If","there","is","an","edge","whose","type","is","``","k","``","between","node","``","i","``","and","node","``","j","``",",","we","will","insert","a","node","``","k","``","into","the","graph","and","link","node","(","``","i","``",",","``","k","``",")","and","(","``","k","``",",","``","j","``",")",".","split_hyphenated",":","bool",",","default=False","Whether","or","not","to","tokenize","segments","of","hyphenated","words","separately","(","\u201c","school","\u201d","\u201c","-","\u201c","\u201c","aged","\u201d",",","\u201c","frog","\u201d","\u201c","-","\u201c","\u201c","lipped","\u201d",")","normalize",":","bool",",","default=False","Whether","to","convert","bracket","(","`","(","`",")","to","-LRB-",",","and","etc",".","sequential_link",":","bool",",","default=True","Whether","to","link","node","tokens","sequentially","(","note","that","it","is","bidirectional",")","verbose",":","int",",","default=0","Whether","to","output","log","infors",".","Set","1","to","output","more","infos",".","Returns","--","--","--","-","joint_graph",":","GraphData","The","merged","graph","data-structure","."]
code: def static_topology(
      cls,
      raw_text_data,
      auxiliary_args,
      split_hyphenated=False,
      normalize=False,
      sequential_link=True,
  ):
      """
              Graph building method.
          Parameters
          ----------
          raw_text_data: str or list[list]
              Raw text data, it can be multi-sentences.
              When it is ``str`` type, it is the raw text.
              When it is ``list[list]`` type, it is the tokenized token lists.
          nlp_processor: StanfordCoreNLP
              NLP parsing tools
          merge_strategy: None or str, option=[None, "tailhead", "sequential", "user_define"]
              Strategy to merge sub-graphs into one graph
              ``None``: It will be the default option. We will do as ``"tailhead"``.
              ``"tailhead"``: Link the sub-graph  ``i``'s tail node with ``i+1``'s head node
              ``"sequential"``: If sub-graph has ``a1, a2, ..., an`` nodes, and sub-graph has
              ``b1, b2, ..., bm`` nodes. We will link ``a1, a2``, ``a2, a3``, ..., ``an-1, an``, \
                                ``an, b1``, ``b1, b2``, ..., ``bm-1, bm``.
              ``"user_define"``: We will give this option to the user. User can override this
              method to define your merge strategy.
          edge_strategy: None or str, option=[None, "homogeneous", "heterogeneous", "as_node"]
              Strategy to process edge.
              ``None``: It will be the default option. We will do as ``"homogeneous"``.
              ``"homogeneous"``: We will drop the edge type information.
                                 If there is a linkage among node ``i`` and node ``j``, we will add an
                                 edge whose weight is ``1.0``. Otherwise there is no edge.
              ``heterogeneous``: We will keep the edge type information.
                                 An edge will have type information like ``n_subj``.
              ``as_node``: We will view the edge as a graph node.
                           If there is an edge whose type is ``k`` between node ``i`` and node ``j``,
                           we will insert a node ``k`` into the graph and link node (``i``, ``k``)
                           and (``k``, ``j``).
          split_hyphenated: bool, default=False
              Whether or not to tokenize segments of hyphenated words separately (“school” “-“ “aged”,
              “frog” “-“ “lipped”)
          normalize: bool, default=False
              Whether to convert bracket (`(`) to  -LRB-, and etc.
          sequential_link: bool, default=True
              Whether to link node tokens sequentially (note that it is bidirectional)
          verbose: int, default=0
              Whether to output log infors. Set 1 to output more infos.
          Returns
          -------
          joint_graph: GraphData
              The merged graph data-structure.
          """
      cls.processor = auxiliary_args["nlp_processor"]
      # split_hyphenated = (False,)
      # normalize = (False,)
      sequential_link = (True,)
      # verbose = 0
      cls.verbose = auxiliary_args["verbose"]
  
      parsed_results = cls.parsing(cls, raw_text_data=raw_text_data)
  
      sub_graphs = []
      for _, parsed_sent in enumerate(parsed_results):
          graph = cls._construct_static_graph(
              parsed_sent,
              edge_strategy=auxiliary_args["edge_strategy"],
              sequential_link=sequential_link,
          )
          sub_graphs.append(graph)
      joint_graph = cls._graph_connect(
          sub_graphs, auxiliary_args["merge_strategy"]
      )
      return joint_graph
  
file_path: graph4nlp/examples/pytorch/name_entity_recognition/dependency_graph_construction_without_tokenize.py
imports: import copy
  import itertools
  import json
  from collections import Counter
  from graph4nlp.pytorch.data.data import GraphData
  from graph4nlp.pytorch.modules.graph_construction.base import StaticGraphConstructionBase
label_desc: Use image node_id 4 for calling the DependencyBasedGraphConstruction_without_tokenizer obj's underlying member method code with example usage: obj.static_topology(cls, raw_text_data, auxiliary_args, split_hyphenated, normalize, sequential_link) and returns: joint_graph