Skip to content

Commit

Permalink
Fix broken wsd
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHammarstedt committed Nov 21, 2024
1 parent 8476618 commit 981a79c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sparv/modules/wsd/wsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 981a79c

Please sign in to comment.