HIT-SCIR / ltp

Language Technology Platform
http://ltp.ai
4.98k stars 1.04k forks source link

stn_split 函数修正 #709

Closed sdvcn closed 2 months ago

sdvcn commented 3 months ago

https://github.com/HIT-SCIR/ltp/blob/main/rust/ltp-cffi/src/stnsplit.rs

for (idx, sentence) in sentences.iter().enumerate() {
        (callback.call)(
            callback.state,
            text.as_ptr(),
            sentence.len(),
            idx,
            sentence.len(),
        );

修改为

for (idx, sentence) in sentences.iter().enumerate() {
        (callback.call)(
            callback.state,
            sentence.as_ptr(),
            sentence.len(),
            idx,
            sentence.len(),
        );