class_docstr: Base class for reading spelling corrections dataset files
  
      
class_docstr_tok: ["Base","class","for","reading","spelling","corrections","dataset","files"]
docstr: Read train data for spelling corrections algorithms
  
  Args:
      data_path: path that needs to be interpreted with :meth:`~deeppavlov.dataset_readers.typos_reader.TyposCustom.build`
  
  Returns:
      train data to pass to a :class:`~deeppavlov.dataset_iterators.typos_iterator.TyposDatasetIterator`
docstr_tok: ["Read","train","data","for","spelling","corrections","algorithms","Args",":","data_path",":","path","that","needs","to","be","interpreted","with",":","meth",":","`","~deeppavlov.dataset_readers.typos_reader.TyposCustom.build","`","Returns",":","train","data","to","pass","to","a",":","class",":","`","~deeppavlov.dataset_iterators.typos_iterator.TyposDatasetIterator","`"]
code: def read(
      cls, data_path: str, *args, **kwargs
  ) -> Dict[str, List[Tuple[str, str]]]:
      """Read train data for spelling corrections algorithms
  
      Args:
          data_path: path that needs to be interpreted with :meth:`~deeppavlov.dataset_readers.typos_reader.TyposCustom.build`
  
      Returns:
          train data to pass to a :class:`~deeppavlov.dataset_iterators.typos_iterator.TyposDatasetIterator`
      """
      fname = cls.build(data_path)
      with fname.open(newline="", encoding="utf8") as tsvfile:
          reader = csv.reader(tsvfile, delimiter="\t")
          next(reader)
          res = [(mistake, correct) for mistake, correct in reader]
      return {"train": res}
  
imports: import csv
  from logging import getLogger
  from pathlib import Path
  from typing import Dict, List, Tuple
  import requests
  from lxml import html
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.dataset_reader import DatasetReader
  from deeppavlov.core.data.utils import is_done, download, mark_done
label_desc: Use image node_id 3 for calling the TyposCustom obj's underlying member method code with example usage: obj.read(cls, data_path) and returns: dict