from _typeshed import Incomplete
from collections import OrderedDict
from collections.abc import Mapping, Sized
from re import Pattern
from typing import Final, TypeVar

from dateparser.conf import Settings

_K = TypeVar("_K", bound=Sized)
_V = TypeVar("_V")

NUMERAL_PATTERN: Final[Pattern[str]]

class Locale:
    shortname: str
    info: OrderedDict[str, Incomplete]
    def __init__(self, shortname: str, language_info: Mapping[Incomplete, Incomplete]) -> None: ...
    def is_applicable(self, date_string: str, strip_timezone: bool = False, settings: Settings | None = None) -> bool: ...
    def count_applicability(self, text: str, strip_timezone: bool = False, settings: Settings | None = None) -> list[int]: ...
    @staticmethod
    def clean_dictionary(dictionary: Mapping[_K, _V], threshold: int = 2) -> Mapping[_K, _V]: ...
    def translate(self, date_string: str, keep_formatting: bool = False, settings: Settings | None = None) -> str: ...
    def translate_search(self, search_string: str, settings: Settings | None = None) -> tuple[list[str], list[str]]: ...
    def get_wordchars_for_detection(self, settings: Settings) -> set[str]: ...
    def to_parserinfo(self, base_cls: type = ...): ...
