# This file is auto-generated by python/tools/gen_stubs.py.
# Do not edit by hand. To update it after changing the public Python API,
# rebuild the package and run:
#     python tools/gen_stubs.py --output src/sentencepiece/__init__.pyi
from typing import Any, IO, Literal, Sequence, overload

__version__: str

_OutType = type[int] | type[str] | type[bytes] | Literal["serialized_proto", "proto", "numpy", "offset_mapping"]
_DecodeOutType = type[str] | type[bytes] | Literal["serialized_proto", "proto", "offset_mapping"]


class ThreadPool:
    def __init__(self, num_threads: int) -> None: ...
    def num_threads(self) -> int: ...


class SentencePieceProcessor:
    def __getitem__(self, piece: str) -> int: ...
    def __init__(self, model_file: str | None = ..., model_proto: bytes | None = ..., return_type: _OutType | None = ..., add_bos: bool = ..., add_eos: bool = ..., reverse: bool = ..., emit_unk_piece: bool = ..., enable_sampling: bool = ..., nbest_size: int = ..., alpha: float = ..., num_threads: int = ..., out_type: _OutType | None = ...) -> None: ...
    def __len__(self) -> int: ...
    def CalculateEntropy(self, input: str | Sequence[str], alpha: float, num_threads: int | None = ...) -> float | list[float]: ...
    def Decode(self, input: int | str | bytes | Sequence[int] | Sequence[str] | Sequence[bytes] | Sequence[Sequence[int]] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], return_type: _DecodeOutType | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _DecodeOutType | None = ..., return_bytes: bool | None = ...) -> Any: ...
    def DecodeIds(self, input: int | Sequence[int] | Sequence[Sequence[int]], return_type: _DecodeOutType = ..., out_type: _DecodeOutType = ..., **kwargs: Any) -> Any: ...
    def DecodeIdsAsImmutableProto(self, input: int | Sequence[int] | Sequence[Sequence[int]], **kwargs: Any) -> Any: ...
    def DecodeIdsAsProto(self, input: int | Sequence[int] | Sequence[Sequence[int]], **kwargs: Any) -> Any: ...
    def DecodeIdsAsSerializedProto(self, input: int | Sequence[int] | Sequence[Sequence[int]], return_type: Literal["serialized_proto"] = ..., out_type: Literal["serialized_proto"] = ..., **kwargs: Any) -> Any: ...
    def DecodePieces(self, input: str | bytes | Sequence[str] | Sequence[bytes] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], return_type: _DecodeOutType = ..., out_type: _DecodeOutType = ..., **kwargs: Any) -> Any: ...
    def DecodePiecesAsImmutableProto(self, input: str | bytes | Sequence[str] | Sequence[bytes] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], **kwargs: Any) -> Any: ...
    def DecodePiecesAsProto(self, input: str | bytes | Sequence[str] | Sequence[bytes] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], **kwargs: Any) -> Any: ...
    def DecodePiecesAsSerializedProto(self, input: str | bytes | Sequence[str] | Sequence[bytes] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], return_type: Literal["serialized_proto"] = ..., out_type: Literal["serialized_proto"] = ..., **kwargs: Any) -> Any: ...
    def Detokenize(self, input: int | str | bytes | Sequence[int] | Sequence[str] | Sequence[bytes] | Sequence[Sequence[int]] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], return_type: _DecodeOutType | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _DecodeOutType | None = ..., return_bytes: bool | None = ...) -> Any: ...
    def Encode(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., enable_sampling: bool | None = ..., nbest_size: int | None = ..., alpha: float | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def EncodeAsIds(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def EncodeAsImmutableProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def EncodeAsNumpy(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def EncodeAsOffsetMapping(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def EncodeAsPieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def EncodeAsProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def EncodeAsSerializedProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def GetPieceSize(self) -> int: ...
    @overload
    def GetScore(self, id: int) -> float: ...
    @overload
    def GetScore(self, id: list[int]) -> list[float]: ...
    @overload
    def IdToPiece(self, id: int) -> str: ...
    @overload
    def IdToPiece(self, id: list[int]) -> list[str]: ...
    @overload
    def IsByte(self, id: int) -> bool: ...
    @overload
    def IsByte(self, id: list[int]) -> list[bool]: ...
    @overload
    def IsControl(self, id: int) -> bool: ...
    @overload
    def IsControl(self, id: list[int]) -> list[bool]: ...
    @overload
    def IsUnknown(self, id: int) -> bool: ...
    @overload
    def IsUnknown(self, id: list[int]) -> list[bool]: ...
    @overload
    def IsUnused(self, id: int) -> bool: ...
    @overload
    def IsUnused(self, id: list[int]) -> list[bool]: ...
    def Load(self, model_file: str | None = ..., model_proto: bytes | None = ...) -> bool: ...
    def LoadFromFile(self, arg: str) -> bool: ...
    def LoadFromSerializedProto(self, serialized: bytes) -> bool: ...
    def NBestEncode(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., nbest_size: int | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def NBestEncodeAsIds(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def NBestEncodeAsImmutableProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def NBestEncodeAsNumpy(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def NBestEncodeAsPieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def NBestEncodeAsProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def NBestEncodeAsSerializedProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def Normalize(self, input: str | bytes | Sequence[str] | Sequence[bytes], with_offsets: bool | None = ...) -> Any: ...
    def OverrideNormalizerSpec(self, **kwargs: object) -> bool: ...
    def ParallelEncode(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., chunk_len: int | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def ParallelEncodeAsIds(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def ParallelEncodeAsImmutableProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def ParallelEncodeAsNumpy(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def ParallelEncodeAsPieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def ParallelEncodeAsProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def ParallelEncodeAsSerializedProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    @overload
    def PieceToId(self, piece: str) -> int: ...
    @overload
    def PieceToId(self, piece: list[str]) -> list[int]: ...
    def SampleEncodeAndScore(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., num_samples: int | None = ..., alpha: float | None = ..., wor: bool | None = ..., include_best: bool | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def SampleEncodeAndScoreAsIds(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAndScoreAsImmutableProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAndScoreAsPieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAndScoreAsProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAndScoreAsSerializedProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAsIds(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAsImmutableProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAsNumpy(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAsPieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAsProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def SampleEncodeAsSerializedProto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def Tokenize(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., enable_sampling: bool | None = ..., nbest_size: int | None = ..., alpha: float | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def bos_id(self) -> int: ...
    def calculate_entropy(self, input: str | Sequence[str], alpha: float, num_threads: int | None = ...) -> float | list[float]: ...
    def decode(self, input: int | str | bytes | Sequence[int] | Sequence[str] | Sequence[bytes] | Sequence[Sequence[int]] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], return_type: _DecodeOutType | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _DecodeOutType | None = ..., return_bytes: bool | None = ...) -> Any: ...
    def decode_ids(self, input: int | Sequence[int] | Sequence[Sequence[int]], return_type: _DecodeOutType = ..., out_type: _DecodeOutType = ..., **kwargs: Any) -> Any: ...
    def decode_ids_as_immutable_proto(self, input: int | Sequence[int] | Sequence[Sequence[int]], **kwargs: Any) -> Any: ...
    def decode_ids_as_proto(self, input: int | Sequence[int] | Sequence[Sequence[int]], **kwargs: Any) -> Any: ...
    def decode_ids_as_serialized_proto(self, input: int | Sequence[int] | Sequence[Sequence[int]], return_type: Literal["serialized_proto"] = ..., out_type: Literal["serialized_proto"] = ..., **kwargs: Any) -> Any: ...
    def decode_pieces(self, input: str | bytes | Sequence[str] | Sequence[bytes] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], return_type: _DecodeOutType = ..., out_type: _DecodeOutType = ..., **kwargs: Any) -> Any: ...
    def decode_pieces_as_immutable_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], **kwargs: Any) -> Any: ...
    def decode_pieces_as_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], **kwargs: Any) -> Any: ...
    def decode_pieces_as_serialized_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], return_type: Literal["serialized_proto"] = ..., out_type: Literal["serialized_proto"] = ..., **kwargs: Any) -> Any: ...
    def detokenize(self, input: int | str | bytes | Sequence[int] | Sequence[str] | Sequence[bytes] | Sequence[Sequence[int]] | Sequence[Sequence[str]] | Sequence[Sequence[bytes]], return_type: _DecodeOutType | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _DecodeOutType | None = ..., return_bytes: bool | None = ...) -> Any: ...
    def encode(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., enable_sampling: bool | None = ..., nbest_size: int | None = ..., alpha: float | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def encode_as_ids(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def encode_as_immutable_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def encode_as_numpy(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def encode_as_offset_mapping(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def encode_as_pieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def encode_as_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def encode_as_serialized_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def eos_id(self) -> int: ...
    @classmethod
    def from_file(cls, model_file: str, return_type: _OutType | None = ..., **kwargs: Any) -> SentencePieceProcessor: ...
    @classmethod
    def from_proto(cls, model_proto: bytes, return_type: _OutType | None = ..., **kwargs: Any) -> SentencePieceProcessor: ...
    def get_piece_size(self) -> int: ...
    @overload
    def get_score(self, id: int) -> float: ...
    @overload
    def get_score(self, id: list[int]) -> list[float]: ...
    @overload
    def id_to_piece(self, id: int) -> str: ...
    @overload
    def id_to_piece(self, id: list[int]) -> list[str]: ...
    @overload
    def is_byte(self, id: int) -> bool: ...
    @overload
    def is_byte(self, id: list[int]) -> list[bool]: ...
    @overload
    def is_control(self, id: int) -> bool: ...
    @overload
    def is_control(self, id: list[int]) -> list[bool]: ...
    @overload
    def is_unknown(self, id: int) -> bool: ...
    @overload
    def is_unknown(self, id: list[int]) -> list[bool]: ...
    @overload
    def is_unused(self, id: int) -> bool: ...
    @overload
    def is_unused(self, id: list[int]) -> list[bool]: ...
    def load(self, model_file: str | None = ..., model_proto: bytes | None = ...) -> bool: ...
    def load_from_file(self, arg: str) -> bool: ...
    def load_from_serialized_proto(self, serialized: bytes) -> bool: ...
    def nbest_encode(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., nbest_size: int | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def nbest_encode_as_ids(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def nbest_encode_as_immutable_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def nbest_encode_as_numpy(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def nbest_encode_as_pieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def nbest_encode_as_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def nbest_encode_as_serialized_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., **kwargs: Any) -> Any: ...
    def normalize(self, input: str | bytes | Sequence[str] | Sequence[bytes], with_offsets: bool | None = ...) -> Any: ...
    def override_normalizer_spec(self, **kwargs: object) -> bool: ...
    def pad_id(self) -> int: ...
    def parallel_encode(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., chunk_len: int | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def parallel_encode_as_ids(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def parallel_encode_as_immutable_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def parallel_encode_as_numpy(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def parallel_encode_as_pieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def parallel_encode_as_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def parallel_encode_as_serialized_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], **kwargs: Any) -> Any: ...
    def piece_size(self) -> int: ...
    @overload
    def piece_to_id(self, piece: str) -> int: ...
    @overload
    def piece_to_id(self, piece: list[str]) -> list[int]: ...
    def sample_encode_and_score(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., num_samples: int | None = ..., alpha: float | None = ..., wor: bool | None = ..., include_best: bool | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def sample_encode_and_score_as_ids(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_and_score_as_immutable_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_and_score_as_pieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_and_score_as_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_and_score_as_serialized_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], num_samples: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_as_ids(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_as_immutable_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_as_numpy(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_as_pieces(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_as_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def sample_encode_as_serialized_proto(self, input: str | bytes | Sequence[str] | Sequence[bytes], nbest_size: int | None = ..., alpha: float | None = ..., **kwargs: Any) -> Any: ...
    def serialized_model_proto(self) -> bytes: ...
    def tokenize(self, input: str | bytes | Sequence[str] | Sequence[bytes], return_type: _OutType | None = ..., add_bos: bool | None = ..., add_eos: bool | None = ..., reverse: bool | None = ..., emit_unk_piece: bool | None = ..., enable_sampling: bool | None = ..., nbest_size: int | None = ..., alpha: float | None = ..., num_threads: int | None = ..., thread_pool: ThreadPool | None = ..., out_type: _OutType | None = ...) -> Any: ...
    def unk_id(self) -> int: ...
    def vocab_size(self) -> int: ...


class SentencePieceTrainer:
    def __init__(self) -> None: ...
    @staticmethod
    def Train(arg: str | None = ..., logstream: IO[Any] | None = ..., normalizer: SentencePieceNormalizer | None = ..., **kwargs: Any) -> None: ...
    @staticmethod
    def train(arg: str | None = ..., logstream: IO[Any] | None = ..., normalizer: SentencePieceNormalizer | None = ..., **kwargs: Any) -> None: ...


class SentencePieceNormalizer:
    def __init__(self, model_file: str | None = ..., model_proto: bytes | None = ..., normalizer_spec: bytes | None = ..., rule_tsv: str | None = ..., rule_name: str | None = ..., norm_map: Sequence[tuple[str, str]] | None = ..., add_dummy_prefix: bool = ..., escape_whitespaces: bool = ..., remove_extra_whitespaces: bool = ...) -> None: ...
    def Decompile(self) -> list[tuple[str, str]]: ...
    def Normalize(self, input: str | bytes | Sequence[str] | Sequence[bytes], with_offsets: bool | None = ...) -> Any: ...
    def decompile(self) -> list[tuple[str, str]]: ...
    def normalize(self, input: str | bytes | Sequence[str] | Sequence[bytes], with_offsets: bool | None = ...) -> Any: ...
    def serialized_model_proto(self) -> bytes: ...
    def serialized_normalizer_spec(self) -> bytes: ...


def SetDataDir(data_dir: str) -> None: ...
def SetMinLogLevel(v: int) -> None: ...
def SetNBestTimeout(timeout_ms: int) -> None: ...
def SetRandomGeneratorSeed(seed: int) -> None: ...
def set_min_log_level(v: int) -> None: ...
def set_nbest_timeout(timeout_ms: int) -> None: ...
def set_random_generator_seed(seed: int) -> None: ...
