code: def load_samples(self, window_size=50, stride=5):
      text = self.text
      characters = self.characters
      n_characters = self.n_characters
      n_samples = 1 + ((len(text) - window_size) // stride)
  
      samples = np.zeros((n_samples, window_size, n_characters))
      targets = np.zeros((n_samples, n_characters))
  
      for i in trange(
          0, len(text) - window_size, stride, total=n_samples
      ):
          sample_id = i // stride
          input_sequence = text[i : i + window_size]
  
          for j, char in enumerate(input_sequence):
              samples[sample_id, j, characters.index(char)] = 1
  
          target_char = text[i + window_size]
          targets[sample_id, characters.index(target_char)] = 1
  
      return train_test_split(samples, targets, test_size=0.1)
  
file_path: neupy/examples/rnn/shakespeare_lstm.py
imports: import os
  import numpy
  from tqdm import trange
  from sklearn.model_selection import train_test_split
  from neupy import layers, algorithms
label_desc: Use image node_id 2 for calling the TextPreprocessing obj's underlying member method code with example usage: obj.load_samples(window_size, stride) and returns: train_test_split