class_docstr: A class for handling data sets.
class_docstr_tok: ["A","class","for","handling","data","sets","."]
code: def _parse_dataset(self, dataset_filepath):
      token_count = collections.defaultdict(lambda: 0)
      label_count = collections.defaultdict(lambda: 0)
      character_count = collections.defaultdict(lambda: 0)
  
      line_count = -1
      tokens = []
      labels = []
      new_token_sequence = []
      new_label_sequence = []
      if dataset_filepath:
          f = codecs.open(dataset_filepath, "r", "UTF-8")
          for line in f:
              line_count += 1
              line = line.strip().split(" ")
              if (
                  len(line) == 0
                  or len(line[0]) == 0
                  or "-DOCSTART-" in line[0]
              ):
                  if len(new_token_sequence) > 0:
                      labels.append(new_label_sequence)
                      tokens.append(new_token_sequence)
                      new_token_sequence = []
                      new_label_sequence = []
                  continue
              token = str(line[0])
              label = str(line[-1])
              token_count[token] += 1
              label_count[label] += 1
  
              new_token_sequence.append(token)
              new_label_sequence.append(label)
  
              for character in token:
                  character_count[character] += 1
  
              if self.debug and line_count > 200:
                  break  # for debugging purposes
  
          if len(new_token_sequence) > 0:
              labels.append(new_label_sequence)
              tokens.append(new_token_sequence)
          f.close()
      return labels, tokens, token_count, label_count, character_count
  
file_path: NeuroNER/neuroner/dataset.py
imports: import sklearn.preprocessing
  import collections
  import codecs
  import os
  import pickle
  import random
  import re
  import time
  import token
  from neuroner import utils
  from neuroner import utils_nlp
label_desc: Use image node_id 2 for calling the Dataset obj's underlying member method code with example usage: obj._parse_dataset(dataset_filepath) and returns: labels,  tokens,  token_count,  label_count,  character_count