Hello,
I've gotten stuck on an error that I am struggling to recreate. Basically, I have compiled a PGF called Symptoms.pgf using --optimize-pgf (not sure if that's relevant to my problem) and now, when using the Python bindings to the C runtime, the following happens:
In [1]: import pgf
In [2]: gr = pgf.readPGF("Symptoms.pgf")
In [3]: zul = gr.languages["SymptomsZul"]
In [4]: afr = gr.languages["SymptomsAfr"]
In [5]: expr = pgf.readExpr("Q7_PointToPainR")
In [6]: afr.linearize(expr)
Out[6]: 'Wys asseblief na die pyn.'
In [7]: zul.linearize(expr)
Out[7]: 'Ngicela ukhombe lapho kunobuhlungu khona.'
In [8]: afr.parse(afr.linearize(expr))
Out[8]: <pgf.Iter at 0x7fcc902decb0>
In [9]: zul.parse(zul.linearize(expr))
---------------------------------------------------------------------------
ParseError Traceback (most recent call last)
<ipython-input-9-64da6cae2013> in <module>()
----> 1 zul.parse(zul.linearize(expr))
ParseError: The sentence is incomplete
In [10]: zul.parse("btw, this error message seems to be misleading...")
---------------------------------------------------------------------------
ParseError Traceback (most recent call last)
<ipython-input-15-2e4d4dc73eee> in <module>()
----> 1 zul.parse("btw, this error message seems to be misleading...")
ParseError: The sentence is incomplete
I have been trying to recreate this kind of error (where a concrete cannot parse its own linearization) with a demo grammar that I could easily share here, but I have not succeeded, mainly because I have no idea what aspects to try and isolate. I have tried looking at the use of the case_sensitive flag, the use of BIND in the Zulu grammar, underscores in some of the linearizations, but they don't seem to be causing the error - at least as far as I am trying to recreate it.
Any help on how I might debug this further would be appreciated!
Regards,
Laurette