zensols.amrspring package#
Submodules#
zensols.amrspring.app#
A client and server that generates AMR graphs from natural language sentences.
Citation:
Bevilacqua et al. (2021) One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Complex Pipeline. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 12564–12573, Virtual, May.
- class zensols.amrspring.app.AmrParseClient(host, port)[source]#
Bases:
object
The client endpoint used to communicate to the server that parses the AMR graphs.
Citation:
Bevilacqua et al. (2021) One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Complex Pipeline. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 12564–12573, Virtual, May.
- __init__(host, port)#
- class zensols.amrspring.app.AmrPrediction(sent, graph, error)[source]#
Bases:
Dictable
An AMR prediction or error.
- __init__(sent, graph, error)#
- write(depth=0, writer=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]#
Write this instance as either a
Writable
or as aDictable
. If class attribute_DICTABLE_WRITABLE_DESCENDANTS
is set asTrue
, then use thewrite()
method on children instead of writing the generated dictionary. Otherwise, write this instance by first creating adict
recursively usingasdict()
, then formatting the output.If the attribute
_DICTABLE_WRITE_EXCLUDES
is set, those attributes are removed from what is written in thewrite()
method.Note that this attribute will need to be set in all descendants in the instance hierarchy since writing the object instance graph is done recursively.
- Parameters:
depth (
int
) – the starting indentation depthwriter (
TextIOBase
) – the writer to dump the content of this writable
- exception zensols.amrspring.app.AmrServiceError[source]#
Bases:
APIError
Client API errors.
- __module__ = 'zensols.amrspring.app'#
- exception zensols.amrspring.app.AmrServiceRequestError(request, res)[source]#
Bases:
AmrServiceError
Errors raised for the protocol transport layer.
- __annotations__ = {}#
- __module__ = 'zensols.amrspring.app'#
zensols.amrspring.cli#
Command line entry point to the application.
- class zensols.amrspring.cli.ApplicationFactory(*args, **kwargs)[source]#
Bases:
ApplicationFactory