From 981a79c657ae36bf7f4f16674f9bab99105f4d0f Mon Sep 17 00:00:00 2001 From: Martin Hammarstedt Date: Thu, 21 Nov 2024 13:09:01 +0100 Subject: [PATCH] Fix broken wsd --- sparv/modules/wsd/wsd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparv/modules/wsd/wsd.py b/sparv/modules/wsd/wsd.py index a0607ef6..176d54c8 100644 --- a/sparv/modules/wsd/wsd.py +++ b/sparv/modules/wsd/wsd.py @@ -179,7 +179,7 @@ def process_output(word: Annotation, out: Output, stdout, in_sentences, saldo_an def make_lemgram(lemgram, word, pos): """Construct lemgram and simple_lemgram format.""" lemgram = lemgram.strip(util.constants.AFFIX) if lemgram != util.constants.AFFIX else "_" - simple_lemgram = util.constants.DELIM.join({(lem[:lem.rfind(".")] for lem in lemgram.split(util.constants.DELIM))}) + simple_lemgram = util.constants.DELIM.join({lem[:lem.rfind(".")] for lem in lemgram.split(util.constants.DELIM)}) # Fix simple lemgram for tokens without lemgram (word + pos) if not simple_lemgram: