Commit 3ca0b41 1 parent a746b3e commit 3ca0b41 Copy full SHA for 3ca0b41
File tree 2 files changed +17
-2
lines changed
python/interface/examples
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change
1
+ from python .interface .examples .simple import stn_split
2
+
3
+
1
4
def issue590 ():
2
5
from ltp import LTP
3
6
ltp = LTP ("LTP/tiny" )
@@ -100,8 +103,17 @@ def issue693():
100
103
)
101
104
102
105
106
+ def issue714 ():
107
+ from ltp import StnSplit
108
+
109
+ spliter = StnSplit ()
110
+ spliter .use_en = False
111
+ sents = spliter .split ("1.联通华盛电商分公司办公室内的灯火彻夜不熄,这已经成为常态。" )
112
+ print (sents )
113
+
114
+
103
115
def main ():
104
- issue693 ()
116
+ issue714 ()
105
117
106
118
107
119
if __name__ == "__main__" :
Original file line number Diff line number Diff line change 5
5
def stn_split ():
6
6
from ltp import StnSplit
7
7
8
- sents = StnSplit ().split ("汤姆生病了。他去了医院。" )
8
+ spliter = StnSplit ()
9
+ spliter .use_en = False # 关闭英文断句
10
+
11
+ sents = spliter .split ("汤姆生病了。他去了医院。" )
9
12
print (sents )
10
13
# [
11
14
# "汤姆生病了。",
You can’t perform that action at this time.
0 commit comments