Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kfst broken on omorfi.generate.hfst #2

Open
thfrkielikone opened this issue Sep 25, 2023 · 0 comments
Open

kfst broken on omorfi.generate.hfst #2

thfrkielikone opened this issue Sep 25, 2023 · 0 comments

Comments

@thfrkielikone
Copy link

thfrkielikone commented Sep 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant