(dirpath, langs, min_len=25)
return data
Args:
        dirpath (str or :class:`pathlib.Path`)
        langs (Set[str])
        min_len (int)

    Returns:
        List[Tuple[str, str]]
Args:
        dirpath (str or :class:`pathlib.Path`)
        langs (Set[str])
        min_len (int)
Args : dirpath ( str or : class : pathlib . Path ) langs ( Set [ str ] ) min_len ( int )
def load_udhr_data(dirpath, langs, min_len=25):
    """
    Args:
        dirpath (str or :class:`pathlib.Path`)
        langs (Set[str])
        min_len (int)

    Returns:
        List[Tuple[str, str]]
    """
    ds = textacy.datasets.UDHR(data_dir=dirpath)
    data = [
        (snippet, meta["lang"])
        for text, meta in ds.records()
        for snippet in text.split("\n")
        if meta["lang"] in langs
        and itertoolz.count(char for char in snippet if char.isalnum()) >= min_len
    ]
    return data
def load_udhr_data ( dirpath , langs , min_len = 25 ) : ds = textacy . datasets . UDHR ( data_dir = dirpath ) data = [ ( snippet , meta [ "lang" ] ) for text , meta in ds . records ( ) for snippet in text . split ( "\n" ) if meta [ "lang" ] in langs and itertoolz . count ( char for char in snippet if char . isalnum ( ) ) >= min_len ] return data