class_docstr: Text recognition LMDB format dataset dumper.
  
  Args:
      task (str): Task type. Options are 'textdet', 'textrecog',
          'textspotter', and 'kie'. It is usually set automatically and users
           do not need to set it manually in config file in most cases.
      split (str): It' s the partition of the datasets. Options are 'train',
          'val' or 'test'. It is usually set automatically and users do not
          need to set it manually in config file in most cases. Defaults to
          None.
      data_root (str): The root directory of the image and
          annotation. It is usually set automatically and users do not need
          to set it manually in config file in most cases. Defaults to None.
      batch_size (int): Number of files written to the cache each time.
          Defaults to 1000.
      encoding (str): Label encoding method. Defaults to 'utf-8'.
      lmdb_map_size (int): Maximum size database may grow to. Defaults to
          1099511627776.
      verify (bool): Whether to check the validity of every image. Defaults
          to True.
code: def __init__(
      self,
      task: str,
      split: str,
      data_root: str,
      batch_size: int = 1000,
      encoding: str = "utf-8",
      lmdb_map_size: int = 1099511627776,
      verify: bool = True,
  ) -> None:
      assert (
          task == "textrecog"
      ), f"TextRecogLMDBDumper only works with textrecog, but got {task}"
      super().__init__(task=task, split=split, data_root=data_root)
      self.batch_size = batch_size
      self.encoding = encoding
      self.lmdb_map_size = lmdb_map_size
      self.verify = verify
  
file_path: mmocr/mmocr/datasets/preparers/dumpers/lmdb_dumper.py
imports: import os.path
  import warnings
  from typing import Dict, List
  import cv2
  import lmdb
  import mmengine
  import numpy
  from mmocr.registry import DATA_DUMPERS
  from .base import BaseDumper
label_desc: Use image node_id 1 to create a new TextRecogLMDBDumper object from inherited base classes: BaseDumper with example: obj = TextRecogLMDBDumper(task, split, data_root, batch_size, encoding, lmdb_map_size, verify)