checked input sentences before feeding into the sentseg model
@@ -613,9 +613,15 @@ class model:
def predict(self, sess, text):
inp_sent = text
+
if inp_sent == "":
return ""
+
+ for p in ['.', '?', '!']:
+ if p in inp_sent:
+ return inp_sent
+
words = word_tokenize(inp_sent)
raw_data = {"word": [words]}
