Update models/watermark_faster.py
Browse files
models/watermark_faster.py
CHANGED
@@ -23,6 +23,7 @@ paddle.enable_static()
|
|
23 |
import re
|
24 |
nltk.download('punkt')
|
25 |
nltk.download('stopwords')
|
|
|
26 |
def cut_sent(para):
|
27 |
para = re.sub('([。!?\?])([^”’])', r'\1\n\2', para)
|
28 |
para = re.sub('([。!?\?][”’])([^,。!?\?\n ])', r'\1\n\2', para)
|
|
|
23 |
import re
|
24 |
nltk.download('punkt')
|
25 |
nltk.download('stopwords')
|
26 |
+
nltk.download('averaged_perceptron_tagger')
|
27 |
def cut_sent(para):
|
28 |
para = re.sub('([。!?\?])([^”’])', r'\1\n\2', para)
|
29 |
para = re.sub('([。!?\?][”’])([^,。!?\?\n ])', r'\1\n\2', para)
|