(dirpath, exclude=None)
return lang_map
Args:
        dirpath (str or :class:`pathlib.Path`)
        exclude (Set[str])

    Returns:
        Dict[str, str]
Args:
        dirpath (str or :class:`pathlib.Path`)
        exclude (Set[str])
Args : dirpath ( str or : class : pathlib . Path ) exclude ( Set [ str ] )
def load_iso_639_data(dirpath, exclude=None):
    """
    Args:
        dirpath (str or :class:`pathlib.Path`)
        exclude (Set[str])

    Returns:
        Dict[str, str]
    """
    dirpath = textacy.utils.to_path(dirpath).resolve()
    rows = textacy.io.read_csv(
        dirpath.joinpath("iso-639-3.tsv").resolve(),
        delimiter="\t",
        fieldnames=[
            "Id",
            "Part2B",
            "Part2T",
            "Part1",
            "Scope",
            "Language_Type",
            "Ref_Name",
            "Comment",
        ],
        quoting=1,
    )
    lang_map = {
        row["Id"]: row["Part1"]
        for row in rows
        if row.get("Part1") and (exclude is None or row["Part1"] not in exclude)
    }
    return lang_map
def load_iso_639_data ( dirpath , exclude = None ) : dirpath = textacy . utils . to_path ( dirpath ) . resolve ( ) rows = textacy . io . read_csv ( dirpath . joinpath ( "iso-639-3.tsv" ) . resolve ( ) , delimiter = "\t" , fieldnames = [ "Id" , "Part2B" , "Part2T" , "Part1" , "Scope" , "Language_Type" , "Ref_Name" , "Comment" , ] , quoting = 1 , ) lang_map = { row [ "Id" ] : row [ "Part1" ] for row in rows if row . get ( "Part1" ) and ( exclude is None or row [ "Part1" ] not in exclude ) } return lang_map