class_docstr: Source: https://lindat.mff.cuni.cz/repository/xmlui/handle/11234/1-4923
  
  References:
      Zeman, Daniel; et al., 2022, Universal Dependencies 2.11,
      LINDAT/CLARIAH-CZ digital library at the Institute of Formal and Applied Linguistics (ÚFAL),
      Faculty of Mathematics and Physics, Charles University,
      http://hdl.handle.net/11234/1-4923.
class_docstr_tok: ["Source",":","https",":","\/\/lindat.mff.cuni.cz\/repository\/xmlui\/handle\/11234\/1-4923","References",":","Zeman",",","Daniel",";","et","al.",",","2022",",","Universal","Dependencies","2.11",",","LINDAT\/CLARIAH-CZ","digital","library","at","the","Institute","of","Formal","and","Applied","Linguistics","(","\u00daFAL",")",",","Faculty","of","Mathematics","and","Physics",",","Charles","University",",","http",":","\/\/hdl.handle.net\/11234\/1-4923","."]
docstr: Args:
      langs
      min_len: Minimum text length in *chars* for a given example to be included.
  
  Returns:
      Sequence of (text, lang) examples.
docstr_tok: ["Args",":","langs","min_len",":","Minimum","text","length","in","*","chars","*","for","a","given","example","to","be","included",".","Returns",":","Sequence","of","(","text",",","lang",")","examples","."]
code: def load(
      self, langs: Set[str], min_len: int = 25
  ) -> List[Tuple[str, str]]:
      """
      Args:
          langs
          min_len: Minimum text length in *chars* for a given example to be included.
  
      Returns:
          Sequence of (text, lang) examples.
      """
      data: list[tuple[str, str]] = []
      match_regex = r"ud-(train|test|dev)\.txt"
      for fpath in tio.get_filepaths(
          self.data_dir, match_regex=match_regex, recursive=True
      ):
          fname = pathlib.Path(fpath).name
          lang, _ = fname.split("_", maxsplit=1)
          if lang not in langs:
              continue
  
          with open(fpath, mode="rt") as f:
              text = f.read()
          if "\n" in text:
              data.extend(
                  (text_segment, lang)
                  for text_segment in re.split(r"\n+", text)
                  if len(text_segment) >= min_len
              )
          else:
              data.extend(
                  (text_segment, lang)
                  for text_segment in _randomly_segment_text(
                      text, (50, 1000)
                  )
                  if len(text_segment) >= min_len
              )
      LOGGER.info("loaded TatoebaDataset data:\n%s ...", data[:3])
      return data
  
imports: from __future__ import annotations
  import logging
  import operator
  import pathlib
  import random
  import re
  from typing import Dict, Iterable, List, Optional, Set, Tuple
  from cytoolz import itertoolz
  import textacy
  import textacy.utils
  from textacy import io
label_desc: Use image node_id 3 for calling the UDDataset obj's underlying member method code with example usage: obj.load(langs, min_len) and returns: data