Add PCFG to ACE command line


I am trying to add PCFG model (ww-gp8-2018.pcfg) to ACE.

But an error message appears. Could you help me please?

[ace: csaw/naive.c:130: csaw_load_pcfg: Assertion `1 == fscanf(f, “terminals %d\n”, &nterminals)’ failed.

Aborted (core dumped) ]

Thanks in advance.

I get this error when I try to load the gzipped PCFG file. Maybe first try decompressing it if you haven’t already?

gunzip ww-gp2-2018.pcfg.gz
ace -g erg-2018-x86-64-0.9.31.dat --pcfg=ww-gp2-2018.pcfg

Good catch, Mike. The PCFG file does indeed need to be unzipped before use; it comes gzipped with ERG releases to reduce its size when downloading or updating the grammar. I’ll check with Woodley about having ACE produce a more informative error message if a gzipped file is wrongly supplied when invoking the parser.

Thank you, Dan and Mike, for your answers.
I tried to reinstall the PCFG.
The message disappeared but still ACE doesn’t give me any result.

Here is what I did using the 2018 version of the ERG:
In the erg/etc directory, I uncompressed one of the two gzipped files:
gunzip all-treebanks-gp0-2018.pcfg.gz
Then I started the ACE parser from within the erg directory adding the flag to use this PCFG model (along with the options to produce just the top parse and to show the MRS output):
ace -g erg.dat -1T --pcfg=etc/all-treebanks-gp0-2018.pcfg
When I provide the following slightly ungrammatical sentence, I get a reasonable-looking MRS, supplied using the PCFG model since the ERG itself won’t parse it:
The cat slept under tree.
Please see if you can reproduce this behavior, and if so, explain in a little more detail where you run into trouble.
Note that the PCFG option currently does not work with the just-released 2020 version of the ERG because of the changed treatment of punctuation marks as separate tokens. New models will have to be trained for this new version of the grammar.