diff --git a/wani.py b/wani.py index a8ead9b..57f2840 100644 --- a/wani.py +++ b/wani.py @@ -1112,6 +1112,13 @@ class StructureMatch: self.matches = [] self.representations = {} + def distinct_matches(self): + dm = set() + keys = list(self.matches[0].keys()) + for words in self.matches: + dm.add(" ".join(words[k].text for k in keys)) + return len(dm) + def append(self, match): self.matches.append(match)