Application to translate from AMR to RDF
Project description
py_amr2fred
From Abstract Meaning Representation AMR (https://amr.isi.edu/) to RDF, according to the syntax of FRED (http://wit.istc.cnr.it/stlab-tools/fred/)
Python version of amr2fred's core functions
Install:
pip install py_amr2fred
Use:
from py_amr2fred import *
amr2fred = Amr2fred()
mode = Glossary.Rdflib_mode.N3
amr_text = """
(c / charge-05 :ARG1 (h / he) :ARG2 (a / and :op1 (i / intoxicate-01 :ARG1 h :location (p / public))
:op2 (r / resist-01 :ARG0 h :ARG1 (a2 / arrest-01 :ARG1 h))))
"""
print(amr2fred.translate(amr_text, serialize=True, mode=mode))
serialize=True returns a string
serialize=False returns a rdflib Graph
Possible formats:
- Glossary.Rdflib_mode.TURTLE
- Glossary.Rdflib_mode.NT
- Glossary.Rdflib_mode.XML
- Glossary.Rdflib_mode.N3
- Glossary.Rdflib_mode.JSON_LD
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py_amr2fred-0.0.3.tar.gz
(1.3 MB
view details)
Built Distribution
File details
Details for the file py_amr2fred-0.0.3.tar.gz
.
File metadata
- Download URL: py_amr2fred-0.0.3.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94ea65d99048f8f13ba20be142f3b56d8945c7d8f86eb7dbd0ebcedb71fea9a0 |
|
MD5 | ac9521cdab4e2ce03e67637ea1bb48d4 |
|
BLAKE2b-256 | 99eca46d6896c6f62069e7dbf06eebfb3a9ae5ade927463cbe4ce595511c1852 |
File details
Details for the file py_amr2fred-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: py_amr2fred-0.0.3-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f55dc0a41ee8d2d51bd0e964cb9e23ffb628c1ac00ffe5f30e7a5e82fe125ac5 |
|
MD5 | 18feacfedc2fb745e09b83104f13ffae |
|
BLAKE2b-256 | 5b2ed04ba061bf99d5b4a1b9c11294c0fb841a9661429ddd6297acbb6c756230 |