Fixed downloading and parsing of structures

Finish tommorow?
This commit is contained in:
2020-07-01 23:16:02 +02:00
parent 887eb37d20
commit f1f540e5da
4 changed files with 23 additions and 19 deletions

View File

@@ -58,7 +58,7 @@ class SkeCollocation:
def __init__(self, data):
self.word = data.word
self.frequency = data.count
self.structure_name = convert_structure(data.gramrel)
self.structure_name, self.structure_id = convert_structure(data.gramrel)
self.other = {"score": data.score, "cm": data.cm}
@@ -242,7 +242,7 @@ class SkeInsert(DataChgClickMessage):
new_collocation = Example()
new_collocation.inner = MultiwordExample()
new_collocation.inner.other_attributes["structureName"] = example.structure_name
new_collocation.inner.other_attributes["structure_id"] = example.structure_id
new_collocation.inner.other_attributes["logDice"] = example.other["score"]
new_collocation.inner.other_attributes["frequency"] = example.frequency
new_collocation.inner.type = "collocation"