update
Browse files- summarizer.py +2 -0
summarizer.py
CHANGED
@@ -101,6 +101,8 @@ def getSummary(link, lexrank_switch, rpunkt_switch):
|
|
101 |
# remove punctuation leftovers
|
102 |
#clean_raw_caption = re.sub('[,?.!]','',raw_caption)
|
103 |
caption = rp.predict(raw_caption)
|
|
|
|
|
104 |
pnct_caption = ts.restore_cr(raw_caption,caption)
|
105 |
pnct_raw_transcript = ts.replacePunctuatedText(raw_transcript, pnct_caption)
|
106 |
|
|
|
101 |
# remove punctuation leftovers
|
102 |
#clean_raw_caption = re.sub('[,?.!]','',raw_caption)
|
103 |
caption = rp.predict(raw_caption)
|
104 |
+
if 'Error' in caption:
|
105 |
+
return caption
|
106 |
pnct_caption = ts.restore_cr(raw_caption,caption)
|
107 |
pnct_raw_transcript = ts.replacePunctuatedText(raw_transcript, pnct_caption)
|
108 |
|