ready for SRL tagging

This commit is contained in:
voje 2019-02-16 11:41:39 +01:00
parent 33bac242ce
commit 9e9e1910a0

View File

@ -112,7 +112,8 @@ class Parser:
def to_conll_2009_SRL(self, sentence_entry):
def fillpred(pos, feat):
# TODO
if pos == "V" and "main" in feat.split("|"):
return True
return False
# works with kres, with parsed links
@ -122,8 +123,8 @@ class Parser:
continue
t_id = token[1]
pos = self.msdmap.slo_msd_to_eng_pos(token[4]),
feat = "|".join(self.msdmap.slo_msd_to_eng_long(token[4]).split(" ")),
pos = self.msdmap.slo_msd_to_eng_pos(token[4])
feat = "|".join(self.msdmap.slo_msd_to_eng_long(token[4]).split(" "))
fprd = fillpred(pos, feat)
"""
@ -134,8 +135,8 @@ class Parser:
print(sentence_entry["links"])
"""
# 1 3 4 5 6 7 8 9 10 11 12 13 14
out_str += "{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n".format(
# 1 3 4 5 6 7 8 9 10 11 12 13 14 15
out_str += "{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n".format(
t_id, # id
token[2], # form
token[3], # lemma