class_docstr: Sequential tagging dataset loader.
  Loads train/test files with tabular separation.
  
  Args:
      train_file (str): path to train file
      test_file (str): path to test file
      max_sentence_length (int, optional): max sentence length
      max_word_length (int, optional): max word length
      tag_field_no (int, optional): index of column to use a y-samples
class_docstr_tok: ["Sequential","tagging","dataset","loader",".","Loads","train\/test","files","with","tabular","separation",".","Args",":","train_file","(","str",")",":","path","to","train","file","test_file","(","str",")",":","path","to","test","file","max_sentence_length","(","int",",","optional",")",":","max","sentence","length","max_word_length","(","int",",","optional",")",":","max","word","length","tag_field_no","(","int",",","optional",")",":","index","of","column","to","use","a","y-samples"]
code: def __init__(
      self,
      train_file,
      test_file,
      max_sentence_length=30,
      max_word_length=20,
      tag_field_no=2,
  ):
      self.files = {"train": train_file, "test": test_file}
      self.max_sent_len = max_sentence_length
      self.max_word_len = max_word_length
      self.tf = tag_field_no
  
      self.vocabs = {
          "token": None,
          "char": None,
          "tag": None,
      }  # 0=pad, 1=unk  # 0=pad
  
      self.data = {}
  
      sentences = self._read_file(self.files["train"])
      train_size = len(sentences)
      sentences += self._read_file(self.files["test"])
      test_size = len(sentences) - train_size
      texts, tags = list(zip(*sentences))
  
      texts_mat, self.vocabs["token"] = word_vector_generator(
          texts, lower=True, start=2
      )
      tags_mat, self.vocabs["tag"] = word_vector_generator(
          tags, start=1
      )
      chars_mat, self.vocabs["char"] = character_vector_generator(
          texts, start=2
      )
  
      texts_mat = pad_sentences(texts_mat, max_length=self.max_sent_len)
      tags_mat = pad_sentences(tags_mat, max_length=self.max_sent_len)
  
      chars_mat = [
          pad_sentences(d, max_length=self.max_word_len)
          for d in chars_mat
      ]
      zeros = np.zeros(
          (len(chars_mat), self.max_sent_len, self.max_word_len)
      )
      for idx, d in enumerate(chars_mat):
          d = d[: self.max_sent_len]
          zeros[idx, : d.shape[0]] = d
      chars_mat = zeros.astype(dtype=np.int32)
  
      self.data["train"] = (
          texts_mat[:train_size],
          chars_mat[:train_size],
          tags_mat[:train_size],
      )
      self.data["test"] = (
          texts_mat[-test_size:],
          chars_mat[-test_size:],
          tags_mat[-test_size:],
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import os
  from os import path
  from typing import List
  import numpy
  from nlp_architect.data.utils import DataProcessor, InputExample, read_column_tagged_file
  from nlp_architect.utils.generic import pad_sentences
  from nlp_architect.utils.io import validate_existing_directory, validate_existing_filepath
  from nlp_architect.utils.text import character_vector_generator, read_sequential_tagging_file, word_vector_generator
  from nlp_architect.utils.text import Vocabulary
label_desc: Use image node_id 1 to create a new SequentialTaggingDataset object from inherited base classes: object with example: obj = SequentialTaggingDataset(train_file, test_file, max_sentence_length, max_word_length, tag_field_no)