class_docstr: Implementation of Dataset class
  
  This is a simple implementation of loading and processing dataset for metapath2vec model.
  
  Args:
      config: dict, some configure parameters.
class_docstr_tok: ["Implementation","of","Dataset","class","This","is","a","simple","implementation","of","loading","and","processing","dataset","for","metapath2vec","model",".","Args",":","config",":","dict",",","some","configure","parameters","."]
code: def __init__(self, config):
      self.config = config
      self.walk_files = os.path.join(
          config["input_path"], config["walk_path"]
      )
      self.word2id_file = os.path.join(
          config["input_path"], config["word2id_file"]
      )
  
      self.word2freq = {}
      self.word2id = {}
      self.id2word = {}
      self.sentences_count = 0
      self.token_count = 0
      self.negatives = []
      self.discards = []
  
      logging.info("reading sentences")
      self.read_words()
      logging.info("initializing discards")
      self.initDiscards()
      logging.info("initializing negatives")
      self.initNegatives()
  
file_path: PGL/legacy/examples/metapath2vec/Dataset.py
imports: import sys
  import os
  import glob
  import numpy
  import tqdm
  import time
  import logging
  import random
  from pgl import heter_graph
  import pickle
label_desc: Use image node_id 1 to create a new Dataset object from inherited base classes: object with example: obj = Dataset(config)