lk_multiword_example #16

Merged
lkavcic merged 3 commits from lk_multiword_example into master 2022-02-16 17:16:19 +00:00
Showing only changes of commit 60f70b60b7 - Show all commits

View File

@ -318,7 +318,7 @@ class SkeInsert(DataChgClickMessage):
new_collocation.inner.other_attributes["frequency"] = example.frequency
new_collocation.inner.type = "collocation"
headword = document.getElementById("ske-search").value
headword = document.getElementById("ske-search").value
lexemes = []
structure_name = example.structure_name.split("-")
gramrel = example.gramrel.split("_")
@ -351,8 +351,12 @@ class SkeInsert(DataChgClickMessage):
lex.text = structure[i]
lex.role = "other"
elif structure[i][0] in ["S", "G", "P", "R"]:
lex.text = headword
lex.role = "headword"
for hw in headword.split(" "):
lex = ComponentLexeme()
lex.text = hw
lex.role = "headword"
lexemes.append(lex)
lexemes.pop(-1)
else:
lex.text = example.word
lex.role = "collocate"