[package]
name = "icu_segmenter"
description = "Unicode line breaking and text segmentation algorithms for text boundaries analysis"
authors.workspace = true
categories.workspace = true
edition.workspace = true
homepage.workspace = true
include.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
[package.metadata.docs.rs]
all-features = true
[dependencies]
displaydoc = { workspace = true }
icu_collections = { workspace = true }
icu_locid = { workspace = true }
icu_provider = { workspace = true, features = ["macros"] }
utf8_iter = { workspace = true }
zerovec = { workspace = true, features = ["yoke"] }
databake = { workspace = true, optional = true, features = ["derive"] }
serde = { workspace = true, features = ["derive", "alloc"], optional = true }
core_maths = { workspace = true, optional = true }
icu_segmenter_data = { workspace = true, optional = true }
icu_locid_transform = { workspace = true, optional = true, features = ["compiled_data"] }
[dev-dependencies]
icu = { path = "../../components/icu", default-features = false }
icu_properties = { path = "../properties", features = ["compiled_data"] }
itertools = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = { workspace = true }
[features]
default = ["compiled_data", "auto"]
std = ["icu_collections/std", "icu_locid/std", "icu_provider/std"]
serde = ["dep:serde", "zerovec/serde", "icu_collections/serde", "icu_provider/serde"]
datagen = ["serde", "dep:databake", "zerovec/databake", "icu_collections/databake"]
lstm = ["dep:core_maths"]
auto = ["lstm"]
compiled_data = ["dep:icu_segmenter_data"]
bench = []
[lib]
bench = false
[[bench]]
name = "bench"
harness = false
[[test]]
name = "complex_word"
required-features = ["auto"]