docstr: Calculate proper sequence length according to the corpus
  
  Args:
      generators:
      use_label:
      cover_rate:
  
  Returns:
docstr_tok: ["Calculate","proper","sequence","length","according","to","the","corpus","Args",":","generators",":","use_label",":","cover_rate",":","Returns",":"]
code: def get_seq_length_from_corpus(
      self,
      generators: List[CorpusGenerator],
      *,
      use_label: bool = False,
      cover_rate: float = 0.95,
  ) -> int:
      """
      Calculate proper sequence length according to the corpus
  
      Args:
          generators:
          use_label:
          cover_rate:
  
      Returns:
  
      """
      seq_lens = []
      for gen in generators:
          for sentence, label in tqdm.tqdm(
              gen, desc="Calculating sequence length"
          ):
              if use_label:
                  seq_lens.append(len(label))
              else:
                  seq_lens.append(len(sentence))
      if cover_rate == 1.0:
          target_index = -1
      else:
          target_index = int(cover_rate * len(seq_lens))
      sequence_length = sorted(seq_lens)[target_index]
      logger.debug(f"Calculated sequence length = {sequence_length}")
      return sequence_length
  
file_path: Kashgari/kashgari/embeddings/abc_embedding.py
imports: import json
  from typing import Dict, List, Any, Optional, Union
  import numpy
  import tensorflow
  import tqdm
  import kashgari
  from kashgari.generators import CorpusGenerator
  from kashgari.logger import logger
  from kashgari.processors import ABCProcessor
label_desc: Use image node_id 5 for calling the ABCEmbedding obj's underlying member method code with example usage: obj.get_seq_length_from_corpus(generators) and returns: sequence_length