class_docstr: NeuroNER model.
  
  Args:
      param_filepath (type): description
      pretrained_model_folder (type): description
      dataset_text_folder (type): description
      character_embedding_dimension (type): description
      character_lstm_hidden_state_dimension (type): description
      check_for_digits_replaced_with_zeros (type): description
      check_for_lowercase (type): description
      debug (type): description
      dropout_rate (type): description
      experiment_name (type): description
      freeze_token_embeddings (type): description
      gradient_clipping_value (type): description
      learning_rate (type): description
      load_only_pretrained_token_embeddings (type): description
      load_all_pretrained_token_embeddings (type): description
      main_evaluation_mode (type): description
      maximum_number_of_epochs (type): description
      number_of_cpu_threads (type): description
      number_of_gpus (type): description
      optimizer (type): description
      output_folder (type): description
      output_scores (bool): description
      patience (type): description
      plot_format (type): description
      reload_character_embeddings (type): description
      reload_character_lstm (type): description
      reload_crf (type): description
      reload_feedforward (type): description
      reload_token_embeddings (type): description
      reload_token_lstm (type): description
      remap_unknown_tokens_to_unk (type): description
      spacylanguage (type): description
      tagging_format (type): description
      token_embedding_dimension (type): description
      token_lstm_hidden_state_dimension (type): description
      token_pretrained_embedding_filepath (type): description
      tokenizer (type): description
      train_model (type): description
      use_character_lstm (type): description
      use_crf (type): description
      use_pretrained_model (type): description
      verbose (type): description
class_docstr_tok: ["NeuroNER","model",".","Args",":","param_filepath","(","type",")",":","description","pretrained_model_folder","(","type",")",":","description","dataset_text_folder","(","type",")",":","description","character_embedding_dimension","(","type",")",":","description","character_lstm_hidden_state_dimension","(","type",")",":","description","check_for_digits_replaced_with_zeros","(","type",")",":","description","check_for_lowercase","(","type",")",":","description","debug","(","type",")",":","description","dropout_rate","(","type",")",":","description","experiment_name","(","type",")",":","description","freeze_token_embeddings","(","type",")",":","description","gradient_clipping_value","(","type",")",":","description","learning_rate","(","type",")",":","description","load_only_pretrained_token_embeddings","(","type",")",":","description","load_all_pretrained_token_embeddings","(","type",")",":","description","main_evaluation_mode","(","type",")",":","description","maximum_number_of_epochs","(","type",")",":","description","number_of_cpu_threads","(","type",")",":","description","number_of_gpus","(","type",")",":","description","optimizer","(","type",")",":","description","output_folder","(","type",")",":","description","output_scores","(","bool",")",":","description","patience","(","type",")",":","description","plot_format","(","type",")",":","description","reload_character_embeddings","(","type",")",":","description","reload_character_lstm","(","type",")",":","description","reload_crf","(","type",")",":","description","reload_feedforward","(","type",")",":","description","reload_token_embeddings","(","type",")",":","description","reload_token_lstm","(","type",")",":","description","remap_unknown_tokens_to_unk","(","type",")",":","description","spacylanguage","(","type",")",":","description","tagging_format","(","type",")",":","description","token_embedding_dimension","(","type",")",":","description","token_lstm_hidden_state_dimension","(","type",")",":","description","token_pretrained_embedding_filepath","(","type",")",":","description","tokenizer","(","type",")",":","description","train_model","(","type",")",":","description","use_character_lstm","(","type",")",":","description","use_crf","(","type",")",":","description","use_pretrained_model","(","type",")",":","description","verbose","(","type",")",":","description"]
docstr: Get paths for the datasets.
  
  Args:
      parameters (type): description.
      dataset_types (type): description.
docstr_tok: ["Get","paths","for","the","datasets",".","Args",":","parameters","(","type",")",":","description",".","dataset_types","(","type",")",":","description","."]
code: def _get_valid_dataset_filepaths(
      self,
      parameters,
      dataset_types=["train", "valid", "test", "deploy"],
  ):
      """
      Get paths for the datasets.
  
      Args:
          parameters (type): description.
          dataset_types (type): description.
      """
      dataset_filepaths = {}
      dataset_brat_folders = {}
  
      for dataset_type in dataset_types:
          dataset_filepaths[dataset_type] = os.path.join(
              parameters["dataset_text_folder"],
              "{0}.txt".format(dataset_type),
          )
          dataset_brat_folders[dataset_type] = os.path.join(
              parameters["dataset_text_folder"], dataset_type
          )
          dataset_compatible_with_brat_filepath = os.path.join(
              parameters["dataset_text_folder"],
              "{0}_compatible_with_brat.txt".format(dataset_type),
          )
  
          # Conll file exists
          if (
              os.path.isfile(dataset_filepaths[dataset_type])
              and os.path.getsize(dataset_filepaths[dataset_type]) > 0
          ):
              # Brat text files exist
              if (
                  os.path.exists(dataset_brat_folders[dataset_type])
                  and len(
                      glob.glob(
                          os.path.join(
                              dataset_brat_folders[dataset_type],
                              "*.txt",
                          )
                      )
                  )
                  > 0
              ):
                  # Check compatibility between conll and brat files
                  brat_to_conll.check_brat_annotation_and_text_compatibility(
                      dataset_brat_folders[dataset_type]
                  )
                  if os.path.exists(
                      dataset_compatible_with_brat_filepath
                  ):
                      dataset_filepaths[
                          dataset_type
                      ] = dataset_compatible_with_brat_filepath
                  conll_to_brat.check_compatibility_between_conll_and_brat_text(
                      dataset_filepaths[dataset_type],
                      dataset_brat_folders[dataset_type],
                  )
  
              # Brat text files do not exist
              else:
                  # Populate brat text and annotation files based on conll file
                  conll_to_brat.conll_to_brat(
                      dataset_filepaths[dataset_type],
                      dataset_compatible_with_brat_filepath,
                      dataset_brat_folders[dataset_type],
                      dataset_brat_folders[dataset_type],
                  )
                  dataset_filepaths[
                      dataset_type
                  ] = dataset_compatible_with_brat_filepath
  
          # Conll file does not exist
          else:
              # Brat text files exist
              if (
                  os.path.exists(dataset_brat_folders[dataset_type])
                  and len(
                      glob.glob(
                          os.path.join(
                              dataset_brat_folders[dataset_type],
                              "*.txt",
                          )
                      )
                  )
                  > 0
              ):
                  dataset_filepath_for_tokenizer = os.path.join(
                      parameters["dataset_text_folder"],
                      "{0}_{1}.txt".format(
                          dataset_type, parameters["tokenizer"]
                      ),
                  )
                  if os.path.exists(dataset_filepath_for_tokenizer):
                      conll_to_brat.check_compatibility_between_conll_and_brat_text(
                          dataset_filepath_for_tokenizer,
                          dataset_brat_folders[dataset_type],
                      )
                  else:
                      # Populate conll file based on brat files
                      brat_to_conll.brat_to_conll(
                          dataset_brat_folders[dataset_type],
                          dataset_filepath_for_tokenizer,
                          parameters["tokenizer"],
                          parameters["spacylanguage"],
                      )
                  dataset_filepaths[
                      dataset_type
                  ] = dataset_filepath_for_tokenizer
  
              # Brat text files do not exist
              else:
                  del dataset_filepaths[dataset_type]
                  del dataset_brat_folders[dataset_type]
                  continue
  
          if parameters["tagging_format"] == "bioes":
              # Generate conll file with BIOES format
              bioes_filepath = os.path.join(
                  parameters["dataset_text_folder"],
                  "{0}_bioes.txt".format(
                      utils.get_basename_without_extension(
                          dataset_filepaths[dataset_type]
                      )
                  ),
              )
              utils_nlp.convert_conll_from_bio_to_bioes(
                  dataset_filepaths[dataset_type], bioes_filepath
              )
              dataset_filepaths[dataset_type] = bioes_filepath
  
      return dataset_filepaths, dataset_brat_folders
  
imports: import codecs
  import configparser
  import copy
  import distutils.util
  import glob
  import os
  import pickle
  from pprint import pprint
  import random
  import shutil
  import sys
  import time
  import warnings
  import pkg_resources
  import numpy
  import matplotlib
  import tensorflow
  from tensorflow.contrib.tensorboard.plugins import projector
  from neuroner import train
  from neuroner import dataset
  from neuroner.entity_lstm import EntityLSTM
  from neuroner import utils
  from neuroner import conll_to_brat
  from neuroner import evaluate
  from neuroner import brat_to_conll
  from neuroner import utils_nlp
label_desc: Use image node_id 3 for calling the NeuroNER obj's underlying member method code with example usage: obj._get_valid_dataset_filepaths(parameters, dataset_types) and returns: dataset_filepaths,  dataset_brat_folders