Skip to content

Commit

Permalink
update #714
Browse files Browse the repository at this point in the history
  • Loading branch information
AlongWY committed Oct 12, 2024
1 parent a746b3e commit 3ca0b41
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 13 additions & 1 deletion python/interface/examples/issues.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from python.interface.examples.simple import stn_split


def issue590():
from ltp import LTP
ltp = LTP("LTP/tiny")
Expand Down Expand Up @@ -100,8 +103,17 @@ def issue693():
)


def issue714():
from ltp import StnSplit

spliter = StnSplit()
spliter.use_en = False
sents = spliter.split("1.联通华盛电商分公司办公室内的灯火彻夜不熄,这已经成为常态。")
print(sents)


def main():
issue693()
issue714()


if __name__ == "__main__":
Expand Down
5 changes: 4 additions & 1 deletion python/interface/examples/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
def stn_split():
from ltp import StnSplit

sents = StnSplit().split("汤姆生病了。他去了医院。")
spliter = StnSplit()
spliter.use_en = False # 关闭英文断句

sents = spliter.split("汤姆生病了。他去了医院。")
print(sents)
# [
# "汤姆生病了。",
Expand Down

0 comments on commit 3ca0b41

Please sign in to comment.