def segments(self, text):
start = <NUM_LIT:0><EOL>for (L, P, R, B, end) in Detector.candidates(text):<EOL><INDENT>if B:<EOL><INDENT>continue<EOL><DEDENT>if self.predict(L, P, R):<EOL><INDENT>yield text[start:end].rstrip()<EOL>start = end<EOL><DEDENT><DEDENT>yield text[start:].rstrip()<EOL>
Given a string of `text`, return a generator yielding each
hypothesized sentence string