Snowball commited on
Commit
c9b65d6
·
1 Parent(s): 0c43119

Update models/watermark_faster.py

Browse files
Files changed (1) hide show
  1. models/watermark_faster.py +1 -0
models/watermark_faster.py CHANGED
@@ -21,6 +21,7 @@ import paddle
21
  from jieba import posseg
22
  paddle.enable_static()
23
  import re
 
24
  def cut_sent(para):
25
  para = re.sub('([。!?\?])([^”’])', r'\1\n\2', para)
26
  para = re.sub('([。!?\?][”’])([^,。!?\?\n ])', r'\1\n\2', para)
 
21
  from jieba import posseg
22
  paddle.enable_static()
23
  import re
24
+ nltk.download('punkt')
25
  def cut_sent(para):
26
  para = re.sub('([。!?\?])([^”’])', r'\1\n\2', para)
27
  para = re.sub('([。!?\?][”’])([^,。!?\?\n ])', r'\1\n\2', para)