docstr: For a given list of strings this function creates index vectors that represent the characters of the strings.
  
  Each string is represented by sequence_length (maximum string length + entries for special symbol) many
  indices representing characters in self.char_dict.
  One can manually set the vector length with the parameter seq_length, though the vector length is always
  at least maximum string length in the list.
  
  Args:
      seq_length: the maximum sequence length to use, if None the maximum is taken..
      tokens: the texts of the toekens to encode
      end_symbol: add self.end_index at the end of each representation
      start_symbol: add self.start_index in front of each representation
      padding_in_front: whether to fill up with self.dummy_index in front or in back of strings
docstr_tok: ["For","a","given","list","of","strings","this","function","creates","index","vectors","that","represent","the","characters","of","the","strings",".","Each","string","is","represented","by","sequence_length","(","maximum","string","length","+","entries","for","special","symbol",")","many","indices","representing","characters","in","self.char_dict",".","One","can","manually","set","the","vector","length","with","the","parameter","seq_length",",","though","the","vector","length","is","always","at","least","maximum","string","length","in","the","list",".","Args",":","seq_length",":","the","maximum","sequence","length","to","use",",","if","None","the","maximum","is","taken","..","tokens",":","the","texts","of","the","toekens","to","encode","end_symbol",":","add","self.end_index","at","the","end","of","each","representation","start_symbol",":","add","self.start_index","in","front","of","each","representation","padding_in_front",":","whether","to","fill","up","with","self.dummy_index","in","front","or","in","back","of","strings"]
code: def words_to_char_indices(
      self,
      tokens: List[str],
      end_symbol=True,
      start_symbol=False,
      padding_in_front=False,
      seq_length=None,
  ):
      """For a given list of strings this function creates index vectors that represent the characters of the strings.
  
      Each string is represented by sequence_length (maximum string length + entries for special symbol) many
      indices representing characters in self.char_dict.
      One can manually set the vector length with the parameter seq_length, though the vector length is always
      at least maximum string length in the list.
  
      Args:
          seq_length: the maximum sequence length to use, if None the maximum is taken..
          tokens: the texts of the toekens to encode
          end_symbol: add self.end_index at the end of each representation
          start_symbol: add self.start_index in front of each representation
          padding_in_front: whether to fill up with self.dummy_index in front or in back of strings
      """
      # add additional columns for special symbols if necessary
      c = int(end_symbol) + int(start_symbol)
  
      max_length = max(len(token) for token in tokens) + c
      sequence_length = (
          max_length if not seq_length else max(seq_length, max_length)
      )
  
      # initialize with dummy symbols
      tensor = self.dummy_index * torch.ones(
          len(tokens), sequence_length, dtype=torch.long
      ).to(flair.device)
  
      for i in range(len(tokens)):
          dif = sequence_length - (len(tokens[i]) + c)
          shift = 0
          if padding_in_front:
              shift += dif
          if start_symbol:
              tensor[i][0 + shift] = self.start_index
          if end_symbol:
              tensor[i][
                  len(tokens[i]) + int(start_symbol) + shift
              ] = self.end_index
          for index, letter in enumerate(tokens[i]):
              tensor[i][
                  index + int(start_symbol) + shift
              ] = self.char_dictionary.get_idx_for_item(letter)
  
      return tensor
  
imports: import logging
  from math import inf
  from typing import List, Optional, Tuple, Union
  import torch
  from torch import nn
  import flair.embeddings
  import flair.nn
  from flair.data import Dictionary, Sentence, Token
  from flair.datasets import DataLoader, FlairDatapointDataset
  from flair.training_utils import Result, store_embeddings
label_desc: Use image node_id 3 for calling the Lemmatizer obj's underlying member method code with example usage: obj.words_to_char_indices(tokens, end_symbol, start_symbol, padding_in_front, seq_length) and returns: tensor