Skip to content

kfst broken on omorfi.generate.hfst #2

Description

@thfrkielikone

kfst fails to produce results where hfst does

Version of kfst tested: 3.0.1 (works with 2.0.0)

Steps to reproduce:

Download omorfi tranducers from https://github.com/flammie/omorfi/releases/tag/v0.9.9 (file omorfi-hfst-models-0.9.9.tar.xz). Test omorfi.generate.hfst first with hfst-lookup with the following string

[WORD_ID=juosta][UPOS=VERB][VOICE=ACT][MOOD=INDV][TENSE=PRESENT][PERS=SG1]

Produces result juoksen with weight 0,000000.

Convert transducer with hfst-fst2txt -f att. Load transducer with kfst, the same string yields results []:

Python 3.11.5 (main, Aug 24 2023, 15:23:30) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from kfst import FST
>>> fst = FST.from_att_file("omorfi.generate.att")
>>> 
>>> fst.lookup("[WORD_ID=juosta][UPOS=VERB][VOICE=ACT][MOOD=INDV][TENSE=PRESENT][PERS=SG1]")
<generator object FST.lookup at 0x108a55800>
>>> list(_)
[]

This affects pyomorfi too in that pyomorfi.generate returns an empty list for the same string.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions