%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/chardet/metadata/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/chardet/metadata/__pycache__/languages.cpython-312.pyc |
� �d�4 � �^ � d Z ddlmZ ddlmZmZ G d� d� Zi d edddg d �d dg�� �d ed ddg d�ddg�� �d edddg d�ddg�� �d edddddgddg�� �d edddg d �d!d"g�� �d# ed#d$dg d �d%d&g�� �d' ed'd(dd)d*gd+d,g�� �d- ed-d.dg d/�d0g�1� �d2 ed2d3dd4gd5d6g�� �d7 ed7d8dg d �d9d:g�� �d; ed;d<dg d=�d>d?g�� �d@ ed@dAdg d �dBdCg�� �dD edDdEdg d �dFdGdHg�� �dI edIdJddKdLgdMdNg�� �dO edOdPdddgdQdRg�� �dS edSdTdddgdUdVg�� �dW edWdXdg d �dYdZg�� � ed[d\dg d]�d^d_g�� ed`dadg d]�dbdcg�� edddedg df�dgdhg�� edidjdg d/�dkg�1� edldmdddgdndog�� edpdqdg d �drdsg�� edtdudddgdvdwg�� edxdydg dz�d{d|g�� ed}d~dddgdd�g�� ed�d�dddgd�d�g�� ed�d�d�g df�d�g��� ed�d�dg d��d�d�g�� ed�d�dg d��d�d�g�� ed�d�dd�gd�d�g�� d���Zy�)�z� Metadata about languages used by our model training code for our SingleByteCharSetProbers. Could be used for other things in the future. This code is based on the language metadata from the uchardet project. � )� ascii_letters)�List�Optionalc � � � e Zd ZdZ ddee dee dedeee dee deee d df� fd � Zd efd�Z � xZ S ) �Languagea� Metadata about a language useful for training models :ivar name: The human name for the language, in English. :type name: str :ivar iso_code: 2-letter ISO 639-1 if possible, 3-letter ISO code otherwise, or use another catalog as a last resort. :type iso_code: str :ivar use_ascii: Whether or not ASCII letters should be included in trained models. :type use_ascii: bool :ivar charsets: The charsets we want to support and create data for. :type charsets: list of str :ivar alphabet: The characters in the language's alphabet. If `use_ascii` is `True`, you only need to add those not in the ASCII set. :type alphabet: str :ivar wiki_start_pages: The Wikipedia pages to start from if we're crawling Wikipedia for training data. :type wiki_start_pages: list of str N�name�iso_code� use_ascii�charsets�alphabet�wiki_start_pages�returnc � �� t �| � � || _ || _ || _ || _ | j r|r |t z }nt }n |st d� �|r#dj t t |� � � nd | _ || _ y )Nz*Must supply alphabet if use_ascii is False� ) �super�__init__r r r r r � ValueError�join�sorted�setr r )�selfr r r r r r � __class__s ��</usr/lib/python3/dist-packages/chardet/metadata/languages.pyr zLanguage.__init__# sy �� � ������ � �� �"��� �� ��>�>���M�)��(����I�J�J�:B�����s�8�}� 5�6��� � 0��� c � � dj d� | j j � D � � }| j j � d|� d�S )Nz, c 3 �T K � | ] \ }}|j d � r�|� d|���� �" y�w)�_�=N)� startswith)�.0�k�vs r � <genexpr>z$Language.__repr__.<locals>.<genexpr><