Cargo Features

LTP has no features set by default.

ltp = { version = "0.1.9", features = ["near-char-type", "parallel", "serialization", "compact_str", "rkyv"] }
char-type cross-char near-char-type

Affects cws::CharacterType

parallel = rayon
serialization = apache-avro, serde, serde_json

Affects ltp::CWSModel, ltp::POSModel, ltp::NERModel

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

rayon parallel?

Enables rayon


serde serialization?

Enables serde


serde_json serialization?
apache-avro serialization?
compact_str implicit feature

Enables compact_str ^0.7

Todo: Nocopy Serialize 更快地加载速度

rkyv implicit feature

Enables rkyv


Zero-copy deserialization framework for Rust