toklen 0.2.0

A single-threaded, lightweight, and fast token counter.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "toklen"
version = "0.2.0"
build = false
exclude = [
    ".github",
    "bench",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A single-threaded, lightweight, and fast token counter."
readme = "README.md"
keywords = [
    "tokenizer",
    "bpe",
    "nlp",
    "token",
    "counting",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/voker-engine/toklen"

[features]
bpe = []
byte_level = []
char_delimiter_split = []
default = ["full"]
digits = []
full = [
    "normalizers",
    "pre_tokenizers",
    "models",
]
lowercase = []
metaspace = []
models = [
    "bpe",
    "word_level",
]
nfc = []
nfd = []
nfkc = []
nfkd = []
normalizers = [
    "nfc",
    "nfd",
    "nfkc",
    "nfkd",
    "lowercase",
    "strip",
    "replace",
    "prepend",
    "byte_level",
    "strip_accents",
]
pre_tokenizers = [
    "byte_level",
    "split",
    "whitespace",
    "whitespace_split",
    "punctuation",
    "metaspace",
    "digits",
    "char_delimiter_split",
]
prepend = []
punctuation = []
replace = []
split = []
strip = []
strip_accents = ["dep:icu_properties"]
whitespace = []
whitespace_split = []
word_level = []

[lib]
name = "toklen"
path = "src/lib.rs"

[dependencies.daachorse]
version = "3.0"

[dependencies.fancy-regex]
version = "0.18"

[dependencies.icu_normalizer]
version = "2"

[dependencies.icu_properties]
version = "2"
features = []
optional = true

[dependencies.memchr]
version = "2"

[dependencies.pcre2]
version = "0.2"

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.thiserror]
version = "2"