From 9e9e1910a05717c50f0fa02e9fbe5f65708d819a Mon Sep 17 00:00:00 2001 From: voje Date: Sat, 16 Feb 2019 11:41:39 +0100 Subject: [PATCH] ready for SRL tagging --- tools/parser/parser.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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