ready for SRL tagging

per-file
voje 5 years ago
parent 33bac242ce
commit 9e9e1910a0

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

Loading…
Cancel
Save