관리-도구
편집 파일: md.cpython-37.pyc
B �bG � @ 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 �F/opt/alt/python37/lib/python3.7/site-packages/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"