diff --git a/corpusparser/Parser.py b/corpusparser/Parser.py index d135256..7a5f38a 100644 --- a/corpusparser/Parser.py +++ b/corpusparser/Parser.py @@ -61,7 +61,10 @@ class Parser(): def parse_any_links_ssj(self, sent_el, links_type): lgrps = sent_el.findall(".//linkGrp") - links = [x for x in lgrps if x.get("type") == links_type][0] + try: + links = [x for x in lgrps if x.get("type") == links_type][0] + except: + return [] res_links = [] for link in links: tar = self.parse_ssj_target_arg(link.get("target"))