Menu

#332 hfst-pmatch2fst no longer accepts "literal" transducers

future
closed
nobody
None
1
2016-02-04
2016-02-04
No

https://sourceforge.net/p/hfst/bugs/315/ gives an example like

echo tyfoon |
  hfst-pmatch <( echo 'Define TOP [ {foo}:{bar}
                                 .O.
                                    {bar}:{baz}
                                  ]
                                  EndTag(o) ;' |
                 hfst-pmatch2fst )

which now prints

terminate called after throwing an instance of 'TransducersAreNotAutomataException'
The archive in /dev/fd/63 doesn't look right.
Did you make it with hfst-pmatch2fst or make sure it's in weighted optimized-lookup format?

In fact, even

$ echo 'Define TOP [ {a}:{b} | {c}:{d} ] EndTag(o) ;' | hfst-pmatch2fst >/dev/null
terminate called after throwing an instance of 'TransducersAreNotAutomataException'
Aborted (core dumped)

fails, while

$ echo 'Define TOP [ {a} | {c} ] EndTag(o) ;' | hfst-pmatch2fst >/dev/null

works, and things like

Define morphology @bin"analyser-disamb-gt-desc.hfst" ;

still allow using transducers.

If this is an intended change, it should probably go in NEWS, otherwise it seems like a regression.

Discussion

  • Sam Hardwick

    Sam Hardwick - 2016-02-04

    Fixed in r4644. The precedence of the pair separator (:) was far too weak since the rewrite, which eliminated a number of special-case pair separator cases (string to symbol, symbol to string, string to epsilon, etc.).

     
  • Sam Hardwick

    Sam Hardwick - 2016-02-04
    • status: open --> closed