[developers] PyDelphin v0.7.0

Michael Wayne Goodman goodmami at uw.edu
Tue Jun 12 02:55:05 CEST 2018


Hi again,

I found a few bugs in the v0.7.0 release, mainly with [incr tsdb()] profile
processing with Python 2.7. I've added fixes and unit tests for these bugs
and released v0.7.1 and v0.7.2 (just after releasing v0.7.1 I noticed a
harmless but confusing error message that I missed during testing; the
releases are functionally identical). If you use Python 2.7 or you use the
`delphin mkprof` command or if your locale is not UTF-8, I strongly suggest
upgrading.

I also added the ability to process [incr tsdb()] profiles with ACE from
PyDelphin:

    >>> from delphin import itsdb
    >>> from delphin.interfaces import ace
    >>> ts = itsdb.TestSuite('mrs')
    >>> with ace.AceParser('../../grammars/erg-1214-x86-64-0.9.27.dat') as
cpu:
    ...     ts.process(cpu)
    ...
    NOTE: parsed 107 / 107 sentences, avg 3253k, time 1.81264s

This functionality is also available via the new `process` command:

    $ delphin process -g ~/grammars/erg-1214-x86-64-0.9.27.dat mrs
    NOTE: parsed 107 / 107 sentences, avg 3253k, time 1.78477s

This process() function overlaps with Woodley's `art` utility (and
partially with [incr tsdb()]), but with some differences:

* art is faster
* art allows for multiple processors via an `arbiter` job controller
* art allows for preprocessors as a filter in the -a ACE option
* process() can recover from ACE crashes
* process() provides more "run" information in the profile
* process() works with PyDelphin's --filter and --apply functions on
profiles
* process() is easier to use from Python scripts
* process() can work with non-standard [incr tsdb()] schemata
* process() can work with non-ACE cpus (e.g., the HTTP API), though I
haven't tested this

Both are capable of parsing, transfer, and generation.

Thanks, and let me know (https://github.com/delph-in/pydelphin/issues) if
you have any issues with the release.


On Mon, May 7, 2018 at 4:41 PM, Michael Wayne Goodman <goodmami at uw.edu>
wrote:

> Hi everyone,
>
> I've released PyDelphin v0.7.0 (available on GitHub (
> https://github.com/delph-in/pydelphin/) and PIP (https://pypi.org/project/
> pyDelphin/)), which adds an improved [incr tsdb()] testsuite API (which
> now allows for programmatic instantiation, left-joins, easier profile
> inspection, etc.), Prolog export for MRS, and a REPP tokenizer (which
> offers the same behavior and characterization (cfrom/cto values) as the PET
> (C++) program, as long as the regexes used are compatible with Python's re
> module, plus a step-by-step "trace" mode for debugging REPPs). There are
> numerous bug fixes and minor features added, as well. See the changelog (
> https://github.com/delph-in/pydelphin/blob/develop/CHANGELOG.md) for more
> info.
>
> There are several backward-incompatible changes (again, see the
> changelog), but I think the only one likely to affect users is the ACE
> interface change. If you previously used something like:
>
>     >>> response = ace.parse(grm, "Abrams slept.")
>     >>> mrs = response['RESULTS'][0]['MRS']
>     >>> drv = response['RESULTS'][0]['DERIV']
>
> Then these latter two lines need to be changed to the following (which has
> been available for almost two years now):
>
>     >>> mrs = response.result(0)['mrs']
>     >>> drv = response.result(0)['derivation']
>
> I've fixed the Bottlenose and Demophin servers and submitted a patch for
> pydmrs, but there may other code still using the old API.
>
> As always, please send bug reports and feature requests to
> https://github.com/delph-in/pydelphin/issues
>
> Thanks
>
> --
> Michael Wayne Goodman
>



-- 
Michael Wayne Goodman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20180611/ddd5b01b/attachment.html>


More information about the developers mailing list