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: Predict
  
  Args:
      text (str): Description.
docstr_tok: ["Predict","Args",":","text","(","str",")",":","Description","."]
code: def predict(self, text):
      """
      Predict
  
      Args:
          text (str): Description.
      """
      self.prediction_count += 1
  
      if self.prediction_count == 1:
          self.parameters["dataset_text_folder"] = os.path.join(
              ".", "data", "temp"
          )
          self.stats_graph_folder, _ = self._create_stats_graph_folder(
              self.parameters
          )
  
      # Update the deploy folder, file, and modeldata
      dataset_type = "deploy"
  
      # Delete all deployment data
      for filepath in glob.glob(
          os.path.join(
              self.parameters["dataset_text_folder"],
              "{0}*".format(dataset_type),
          )
      ):
          if os.path.isdir(filepath):
              shutil.rmtree(filepath)
          else:
              os.remove(filepath)
  
      # Create brat folder and file
      dataset_brat_deploy_folder = os.path.join(
          self.parameters["dataset_text_folder"], dataset_type
      )
      utils.create_folder_if_not_exists(dataset_brat_deploy_folder)
      dataset_brat_deploy_filepath = os.path.join(
          dataset_brat_deploy_folder,
          "temp_{0}.txt".format(str(self.prediction_count).zfill(5)),
      )
      # self._get_dataset_brat_deploy_filepath(dataset_brat_deploy_folder)
      with codecs.open(dataset_brat_deploy_filepath, "w", "UTF-8") as f:
          f.write(text)
  
      # Update deploy filepaths
      (
          dataset_filepaths,
          dataset_brat_folders,
      ) = self._get_valid_dataset_filepaths(
          self.parameters, dataset_types=[dataset_type]
      )
      self.dataset_filepaths.update(dataset_filepaths)
      self.dataset_brat_folders.update(dataset_brat_folders)
  
      # Update the dataset for the new deploy set
      self.modeldata.update_dataset(
          self.dataset_filepaths, [dataset_type]
      )
  
      # Predict labels and output brat
      output_filepaths = {}
      prediction_output = train.prediction_step(
          self.sess,
          self.modeldata,
          dataset_type,
          self.model,
          self.transition_params_trained,
          self.stats_graph_folder,
          self.prediction_count,
          self.parameters,
          self.dataset_filepaths,
      )
  
      _, _, output_filepaths[dataset_type] = prediction_output
      conll_to_brat.output_brat(
          output_filepaths,
          self.dataset_brat_folders,
          self.stats_graph_folder,
          overwrite=True,
      )
  
      # Print and output result
      text_filepath = os.path.join(
          self.stats_graph_folder,
          "brat",
          "deploy",
          os.path.basename(dataset_brat_deploy_filepath),
      )
      annotation_filepath = os.path.join(
          self.stats_graph_folder,
          "brat",
          "deploy",
          "{0}.ann".format(
              utils.get_basename_without_extension(
                  dataset_brat_deploy_filepath
              )
          ),
      )
      text2, entities = brat_to_conll.get_entities_from_brat(
          text_filepath, annotation_filepath, verbose=True
      )
      assert text == text2
      return entities
  
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 6 for calling the NeuroNER obj's underlying member method code with example usage: obj.predict(text) and returns: entities