(self, begin, end)
split characters by character category.
split characters by character category.
split characters by character category .
def _split_chars(self, begin, end):
        """split characters by character category."""

        s = self.document.gettext(begin, end)

        def get_category(c):
            return unicodedata.category(c)[0]

        for key, chars in itertools.groupby(s, get_category):
            chars = ''.join(chars)
            end = begin + len(chars)
            yield begin, end, chars, key
            begin = end
def _split_chars ( self , begin , end ) : s = self . document . gettext ( begin , end ) def get_category ( c ) : return unicodedata . category ( c ) [ 0 ] for key , chars in itertools . groupby ( s , get_category ) : chars = '' . join ( chars ) end = begin + len ( chars ) yield begin , end , chars , key begin = end