Warlord-K commited on
Commit
6cdb392
·
1 Parent(s): 0eeb302

Fix Text Preprocessor

Browse files
Files changed (1) hide show
  1. Videobook/TextPreprocessor.py +2 -1
Videobook/TextPreprocessor.py CHANGED
@@ -54,9 +54,10 @@ class TextPreprocessor:
54
  return {'pos':positive, 'neg': negative}
55
 
56
  def __call__(self, text):
 
57
  coref_text = self.coref(text)
58
  sentences = nltk.sent_tokenize(coref_text)
59
  processed_sentences = []
60
  for sentence in sentences:
61
  processed_sentences.append(self.neg_prompt(sentence))
62
- return processed_sentences, sentences
 
54
  return {'pos':positive, 'neg': negative}
55
 
56
  def __call__(self, text):
57
+ old_sentences = nltk.sent_tokenize(text)
58
  coref_text = self.coref(text)
59
  sentences = nltk.sent_tokenize(coref_text)
60
  processed_sentences = []
61
  for sentence in sentences:
62
  processed_sentences.append(self.neg_prompt(sentence))
63
+ return processed_sentences, old_sentences