'Search result returned from Pattern.match(sentence),
containing a sequence of Word objects.'

def __init__(self, pattern, words=[], map={}):

    self.pattern = pattern
    self.words = words
    self._map1 = dict()
    self._map2 = dict()
    for w in self.words:
        self._map1[w.index] = map[w.index]
    for (k, v) in self._map1.items():
        self._map2.setdefault(self.pattern.sequence.index(v), []).append(k)
    for (k, v) in self._map2.items():
        v.sort()
