def __call__(self, text, tokens):
        size = self.size
        first = None
        frag = []
        
        for t in tokens:
            if first is None:
                first = t.startchar
            
            if t.endchar - first > size:
                first = None
                if frag:
                    yield Fragment(frag)
                frag = []
            
            frag.append(t)
            
        if frag:
            yield Fragment(frag)
dataset/ETHPy150Open tallstreet/Whoosh-AppEngine/src/whoosh/highlight.py/SimpleFragmenter.__call__/original