Esempio n. 1
0
 def _join_condition(self, sentences, current):
     """If this method returns @c True, _join_sentences joins the two current
     and the next sentence."""
     end_with_abbrev = self._end_in_abbrev(sentences[current])
     if end_with_abbrev is not None:
         if end_with_abbrev or not NltkTools.starts_with_upper(sentences[current + 1]):
             return True
         return False
     else:
         return (self._match_patterns(sentences[current]) and
                 NltkTools.starts_with_upper(sentences[current + 1]))
Esempio n. 2
0
 def _join_condition(self, sentences, current):
     """If this method returns @c True, _join_sentences joins the two current
     and the next sentence."""
     end_with_abbrev = self._end_in_abbrev(sentences[current])
     if end_with_abbrev is not None:
         if end_with_abbrev or not NltkTools.starts_with_upper(
                 sentences[current + 1]):
             return True
         return False
     else:
         return (self._match_patterns(sentences[current])
                 and NltkTools.starts_with_upper(sentences[current + 1]))