HUGE refactor, creating lots of modules, no code changes though!

This commit is contained in:
2019-06-15 18:55:35 +02:00
parent 43c6c9151b
commit 90dbbca5d5
18 changed files with 1708 additions and 1544 deletions

20
src/match.py Normal file
View File

@@ -0,0 +1,20 @@
class StructureMatch:
def __init__(self, match_id, structure):
self.match_id = match_id
self.structure = structure
self.matches = []
self.representations = {}
def distinct_forms(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)
def __len__(self):
return len(self.matches)