diff --git a/tools/parser/parser.py b/tools/parser/parser.py index 639e73c..b2a4189 100644 --- a/tools/parser/parser.py +++ b/tools/parser/parser.py @@ -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