[developers] Structured output from ACE

Michael Wayne Goodman goodmami at uw.edu
Thu Jun 30 01:39:16 CEST 2016


Thanks, Woodley,

It seems to work well, and I'm happy to report that pyDelphin had no
problem interpreting the information:

>>> from delphin.interfaces import ace
>>> from delphin.derivation import Derivation
>>> result = ace.parse(
...     '/home/goodmami/erg-1214-x86-64-0.9.23.dat',
...     'Abrams arrived.',
...     executable='/home/goodmami/repos/ace/ace',
...     cmdargs=['--udx=all'])
>>> d = Derivation.from_string(result['RESULTS'][0]['DERIV'])
>>> d.entity
'sb-hd_mc_c at subjh_mc_rule'
>>> d.basic_entity()
'sb-hd_mc_c'
>>> d.lexical_type()
'subjh_mc_rule'

Although the accessor methods now seem inappropriately named, since it's
not just lexical type information being stored (
https://github.com/delph-in/pydelphin/issues/78).

I don't have any plans for the ^ head marker, but maybe Ned or someone
wants to use it in visualizing parse trees? Anyway I'm happy to not have it
for now.

I look forward to the release of ACE 0.9.24!

On Tue, Jun 28, 2016 at 3:10 PM Woodley Packard <sweaglesw at sweaglesw.org>
wrote:

> Hi again Mike,
>
> I’ve checked in a new option which produces UDX-formatted @type tags.
> Using "--udx" produces tags just on the lexeme nodes, and "--udx=all"
> produces tags on the rule nodes too.
>
> The UDX headedness marker ("^") is not generated at the moment.  The
> contents of the file that specifies headedness of rules (etc/rules.hds) is
> not stored in the compiled grammar image currently, but more critically,
> that format change breaks ACE’s assumption that partial derivation tree
> strings can be reused in different contexts (they are cached for faster
> generation of UDF when exhaustive or top-N unpacking is invoked).  It would
> be possible to work around that assumption, but I’m not going to do it
> without a clear need. :-)
>
> --Woodley
>
> On Jun 24, 2016, at 11:59 AM, Michael Wayne Goodman <goodmami at uw.edu>
> wrote:
>
> I will put a little more thought into whether and how to get the type
>> information out to you.
>>
>
> Following up on my and Stephan's previous messages, the ItsdbDerivations
> wiki only mentions adding types on preterminal nodes, but its method of
> doing so (joining entity names and type names with @) doesn't change the
> tree structurally, so I imagine that method could easily be reused to allow
> the types on other nonterminals as well.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20160629/b4786f9c/attachment.html>


More information about the developers mailing list