Clusters now as multipledigit number, correct-er numbering and some removal

This commit is contained in:
2020-02-01 21:43:57 +01:00
parent cf7c8b610b
commit 9dd9ac7854
6 changed files with 17 additions and 20 deletions

View File

@@ -30,6 +30,8 @@ class Entry(Editable):
self.measure["text"] = measure.textContent
self.labels = import_label_list("head labelList label", entry_xml)
Sense.reset_cluster_count()
self.senses = [Sense(sense_xml) for sense_xml in
entry_xml.querySelectorAll("body senseList sense")]

View File

@@ -106,8 +106,7 @@ class MultiwordExample:
for key, value in self.other_attributes.items():
result.setAttribute(key, value)
if self.cluster_valid:
result.setAttribute("cluster", str(self.cluster))
result.setAttribute("cluster", str(self.cluster))
if self.type is not None:
result.setAttribute("type", self.type)

View File

@@ -43,4 +43,9 @@ class Sense(Editable):
result.add(cluster)
return sorted(result)
@staticmethod
def reset_cluster_count():
global cluster_min
cluster_min = 0