[package]
edition = "2024"
rust-version = "1.85"
name = "morpheme"
version = "0.5.0"
authors = ["The morpheme authors"]
build = false
exclude = [
"tests/",
"benches/",
"examples/",
"src/pre_tokenizers/testdata/",
"src/pre_tokenizers/tests.rs",
"src/models/bpe/fixture_data.rs",
"src/models/bpe/fixture_tests.rs",
"src/trainers/bpe/parity_data.rs",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Fast, pure-Rust subword tokenization (BPE, WordPiece, Unigram) compatible with Hugging Face tokenizers."
readme = "README.md"
keywords = [
"tokenizer",
"bpe",
"wordpiece",
"sentencepiece",
"nlp",
]
categories = [
"text-processing",
"science",
]
license = "MIT"
repository = "https://github.com/sourceblender/morpheme"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
default = [
"progressbar",
"parallel",
]
hub = [
"dep:ureq",
"dep:sha1",
"dep:sha2",
]
parallel = ["dep:rayon"]
progressbar = ["dep:indicatif"]
[lib]
name = "morpheme"
path = "src/lib.rs"
bench = false
[dependencies.aho-corasick]
version = "1"
[dependencies.fancy-regex]
version = "0.19"
[dependencies.indicatif]
version = "0.18"
optional = true
[dependencies.rayon]
version = "1"
optional = true
[dependencies.rustc-hash]
version = "2"
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.thiserror]
version = "2"
[dependencies.unicode-normalization-alignments]
version = "0.1"
[dependencies.unicode-segmentation]
version = "1"
[dependencies.unicode_categories]
version = "0.1"
[dev-dependencies.criterion]
version = "0.7"
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.serde_json]
version = "1"
features = ["preserve_order"]
[dev-dependencies.sha2]
version = "0.11"
[dev-dependencies.tempfile]
version = "3"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.sha1]
version = "0.11"
optional = true
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.sha2]
version = "0.11"
optional = true
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tempfile]
version = "3"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.ureq]
version = "3"
optional = true