From 170a5278e0442a9894e26747b081db29ef9a3942 Mon Sep 17 00:00:00 2001 From: ylfeng Date: Tue, 3 Sep 2024 17:05:25 +0800 Subject: [PATCH] fix #709 --- rust/ltp-cffi/src/stnsplit.rs | 2 +- rust/ltp/Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/ltp-cffi/src/stnsplit.rs b/rust/ltp-cffi/src/stnsplit.rs index 74195f2a..500c8a5a 100644 --- a/rust/ltp-cffi/src/stnsplit.rs +++ b/rust/ltp-cffi/src/stnsplit.rs @@ -46,7 +46,7 @@ pub extern "C" fn stn_split_with_options( for (idx, sentence) in sentences.iter().enumerate() { (callback.call)( callback.state, - text.as_ptr(), + sentence.as_ptr(), sentence.len(), idx, sentence.len(), diff --git a/rust/ltp/Cargo.toml b/rust/ltp/Cargo.toml index e6091ef3..00412544 100644 --- a/rust/ltp/Cargo.toml +++ b/rust/ltp/Cargo.toml @@ -51,7 +51,7 @@ rayon = { version = "1.5", optional = true } # 序列化 serde = { version = "1.0", features = ["derive"], optional = true } serde_json = { version = "1.0", optional = true } -apache-avro = { version = "0.16.0", optional = true } +apache-avro = { version = "0.17.0", optional = true } # Todo: Nocopy Serialize 更快地加载速度 compact_str = { version = "0.8", optional = true } @@ -68,5 +68,5 @@ serialization = ["serde", "serde_json", "apache-avro"] [dev-dependencies] clap = { version = "4", features = ["derive"] } -ndarray = "0.15" +ndarray = "0.16" ndarray-npy = { version = "0.8", features = ["npz"] }