Skip to content

Instantly share code, notes, and snippets.

@Sirsirious
Last active February 4, 2020 18:52
Show Gist options
  • Save Sirsirious/80ec7842111ea65a9dc38ac6b7615590 to your computer and use it in GitHub Desktop.
Save Sirsirious/80ec7842111ea65a9dc38ac6b7615590 to your computer and use it in GitHub Desktop.
The sentencizer for our DummySentencizer
def _sentencize(self):
work_sentence = self.raw
for character in self._split_characters:
work_sentence = work_sentence.replace(character, character+""+self._delimiter_token)
self.sentences = [x.strip() for x in work_sentence.split(self._delimiter_token) if x !='']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment