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:     Add node tokens appeared in graph g to vocabulary.
  Parameters
  ----------
  g: GraphData
      Graph data-structure.
docstr_tok: ["Add","node","tokens","appeared","in","graph","g","to","vocabulary",".","Parameters","--","--","--","--","--","g",":","GraphData","Graph","data-structure","."]
code: def add_vocab(self, g):
      """
          Add node tokens appeared in graph g to vocabulary.
      Parameters
      ----------
      g: GraphData
          Graph data-structure.
      """
      for i in range(g.get_node_num()):
          attr = g.get_node_attrs(i)[i]
          self.vocab.word_vocab._add_words([attr["token"]])
  
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 2 for calling the DependencyBasedGraphConstruction_without_tokenizer obj's underlying member method code with example usage: obj.add_vocab(g) without return types