|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /usr/local/lib/python3.6/site-packages/charset_normalizer/__pycache__/ |
Upload File : |
3
G�KdG � @ s< d dl mZ d dlmZmZ ddlmZmZ ddlm Z m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZ G dd� d�ZG dd � d e�ZG d
d� de�ZG dd
� d
e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�Z ee! ee! e"d�dd�Z#edd�d#e!e$e"e$d�d d!��Z%d"S )$� )� lru_cache)�List�Optional� )�COMMON_SAFE_ASCII_CHARACTERS�UNICODE_SECONDARY_RANGE_KEYWORD)�is_accentuated�is_ascii�is_case_variable�is_cjk�is_emoticon� is_hangul�is_hiragana�is_katakana�is_latin�is_punctuation�is_separator� is_symbol�is_thai�
remove_accent�
unicode_rangec @ sP e Zd ZdZeed�dd�Zedd�dd�Zdd�d d
�Ze e
d�dd��ZdS )
�MessDetectorPluginzy
Base abstract class used for mess detection plugins.
All detectors MUST extend and implement given methods.
)� character�returnc C s t �dS )z@
Determine if given character should be fed in.
N)�NotImplementedError)�selfr � r �C/tmp/pip-build-8nxjc3nm/charset-normalizer/charset_normalizer/md.py�eligible s zMessDetectorPlugin.eligibleNc C s t �dS )z�
The main routine to be executed upon character.
Insert the logic in witch the text would be considered chaotic.
N)r )r r r r r �feed$ s zMessDetectorPlugin.feed)r c C s t �dS )zB
Permit to reset the plugin to the initial state.
N)r )r r r r �reset+ s zMessDetectorPlugin.resetc C s t �dS )z�
Compute the chaos ratio based on what your feed() has seen.
Must NOT be lower than 0.; No restriction gt 0.
N)r )r r r r �ratio1 s zMessDetectorPlugin.ratio)�__name__�
__module__�__qualname__�__doc__�str�boolr r r �property�floatr! r r r r r s r c @ sZ e Zd Zdd�dd�Zeed�dd�Zedd�dd �Zdd�d
d�Ze e
d�dd
��ZdS )� TooManySymbolOrPunctuationPluginN)r c C s"