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

Update models/watermark_faster.py

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