diff --git a/README.md b/README.md index c7395cd9..703d6765 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,8 @@ if torch.cuda.is_available(): # ltp.cuda() ltp.to("cuda") -output = ltp.pipeline(["他叫汤姆去拿外衣。"], tasks=["cws", "pos", "ner", "srl", "dep", "sdp"]) +# 分词 cws、词性 pos、命名实体标注 ner、语义角色标注 srl、依存句法分析 dep、语义依存分析树 sdp、语义依存分析图 sdpg +output = ltp.pipeline(["他叫汤姆去拿外衣。"], tasks=["cws", "pos", "ner", "srl", "dep", "sdp", "sdpg"]) # 使用字典格式作为返回结果 print(output.cws) # print(output[0]) / print(output['cws']) # 也可以使用下标访问 print(output.pos) diff --git a/python/extension/Cargo.toml b/python/extension/Cargo.toml index 5e1b20cb..f42faef5 100644 --- a/python/extension/Cargo.toml +++ b/python/extension/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ltp-extension" -version = "0.1.11" +version = "0.1.12" edition = "2021" authors = ["ylfeng "] description = "Rust Extension For Language Technology Platform(Python)." @@ -18,7 +18,7 @@ crate-type = ["cdylib"] [dependencies] libc = { version = "0.2" } rayon = { version = "1.7" } -rayon-cond = { version = "0.2" } +rayon-cond = { version = "0.3" } anyhow = { version = "1.0" } serde = { version = "1.0", features = ["derive"] } pyo3 = { version = "0.19", features = ["extension-module", "anyhow", "serde"] } diff --git a/python/interface/README.md b/python/interface/README.md index c7395cd9..703d6765 100644 --- a/python/interface/README.md +++ b/python/interface/README.md @@ -95,7 +95,8 @@ if torch.cuda.is_available(): # ltp.cuda() ltp.to("cuda") -output = ltp.pipeline(["他叫汤姆去拿外衣。"], tasks=["cws", "pos", "ner", "srl", "dep", "sdp"]) +# 分词 cws、词性 pos、命名实体标注 ner、语义角色标注 srl、依存句法分析 dep、语义依存分析树 sdp、语义依存分析图 sdpg +output = ltp.pipeline(["他叫汤姆去拿外衣。"], tasks=["cws", "pos", "ner", "srl", "dep", "sdp", "sdpg"]) # 使用字典格式作为返回结果 print(output.cws) # print(output[0]) / print(output['cws']) # 也可以使用下标访问 print(output.pos) diff --git a/rust/ltp/Cargo.toml b/rust/ltp/Cargo.toml index b7cfef9a..7558c89a 100644 --- a/rust/ltp/Cargo.toml +++ b/rust/ltp/Cargo.toml @@ -34,7 +34,7 @@ required-features = ["serialization", "parallel"] [dependencies] anyhow = "1" num-traits = "0.2" -itertools = "0.10" +itertools = "0.11" cedarwood = "0.4"