|
|
|
@ -11,6 +11,7 @@ from view.utils import clean_label
|
|
|
|
|
class Sense(Data):
|
|
|
|
|
def __init__(self):
|
|
|
|
|
self.original_idx = -1
|
|
|
|
|
self.id = None
|
|
|
|
|
self.definition = {}
|
|
|
|
|
self.labels = []
|
|
|
|
|
self.translations = []
|
|
|
|
@ -18,6 +19,7 @@ class Sense(Data):
|
|
|
|
|
|
|
|
|
|
def import_xml(self, sense_xml, idx):
|
|
|
|
|
self.original_idx = idx
|
|
|
|
|
self.id = sense_xml.getAttribute("id") if sense_xml.hasAttribute("id") else None
|
|
|
|
|
|
|
|
|
|
for definition in sense_xml.querySelectorAll("definitionList definition"):
|
|
|
|
|
key = definition.getAttribute("type")
|
|
|
|
|