Determine distrinct matches for one colocation id.

pull/1/head
Ozbolt Menegatti 5 years ago
parent 2773a8b9e9
commit 9ae7e1e9f6

@ -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)

Loading…
Cancel
Save