Returns a list of sentences from the given string. Punctuation marks are separated from each word by a space.
(self, string, **kwargs)
| 509 | self.language = language |
| 510 | |
| 511 | def find_tokens(self, string, **kwargs): |
| 512 | """ Returns a list of sentences from the given string. |
| 513 | Punctuation marks are separated from each word by a space. |
| 514 | """ |
| 515 | # "The cat purs." => ["The cat purs ."] |
| 516 | return find_tokens(string, |
| 517 | punctuation = kwargs.get( "punctuation", PUNCTUATION), |
| 518 | abbreviations = kwargs.get("abbreviations", ABBREVIATIONS), |
| 519 | replace = kwargs.get( "replace", replacements), |
| 520 | linebreak = r"\n{2,}") |
| 521 | |
| 522 | def find_tags(self, tokens, **kwargs): |
| 523 | """ Annotates the given list of tokens with part-of-speech tags. |