(self, a, b)
Raw procedure for matching summary in text, described in paper.
def _match(self, a, b):

        """

        Raw procedure for matching summary in text, described in paper.

        """

        self._matches = []

        a_start = b_start = 0

        while a_start < len(a):

            best_match = None
            best_match_length = 0

            while b_start < len(b):

                if a[a_start] == b[b_start]:

                    a_end = a_start
                    b_end = b_start

                    while a_end < len(a) and b_end < len(b) \
                            and b[b_end] == a[a_end]:

                        b_end += 1
                        a_end += 1

                    length = a_end - a_start

                    if length > best_match_length:

                        best_match = Fragments.Match(a_start, b_start, length)
                        best_match_length = length

                    b_start = b_end

                else:

                    b_start += 1

            b_start = 0

            if best_match:

                if best_match_length > 0:
                    self._matches.append(best_match)

                a_start += best_match_length

            else:

                a_start += 1
def _match ( self , a , b ) : self . _matches = [ ] a_start = b_start = 0 while a_start < len ( a ) : best_match = None best_match_length = 0 while b_start < len ( b ) : if a [ a_start ] == b [ b_start ] : a_end = a_start b_end = b_start while a_end < len ( a ) and b_end < len ( b ) and b [ b_end ] == a [ a_end ] : b_end += 1 a_end += 1 length = a_end - a_start if length > best_match_length : best_match = Fragments . Match ( a_start , b_start , length ) best_match_length = length b_start = b_end else : b_start += 1 b_start = 0 if best_match : if best_match_length > 0 : self . _matches . append ( best_match ) a_start += best_match_length else : a_start += 1