Skip to content

Commit

Permalink
更新依赖项
Browse files Browse the repository at this point in the history
  • Loading branch information
AlongWY committed Jul 4, 2023
1 parent 54f36cd commit da67549
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions python/extension/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ltp-extension"
version = "0.1.11"
version = "0.1.12"
edition = "2021"
authors = ["ylfeng <[email protected]>"]
description = "Rust Extension For Language Technology Platform(Python)."
Expand All @@ -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"] }
Expand Down
3 changes: 2 additions & 1 deletion python/interface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion rust/ltp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ required-features = ["serialization", "parallel"]
[dependencies]
anyhow = "1"
num-traits = "0.2"
itertools = "0.10"
itertools = "0.11"

cedarwood = "0.4"

Expand Down

0 comments on commit da67549

Please sign in to comment.