Cargo Features

LTP has no features set by default.

[dependencies]
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

rkyv:

Zero-copy deserialization framework for Rust