Git Product home page Git Product logo

yatter's Introduction

YATTER

GitHub DOI PyPI GitHub Release Date codecov

The tool translates mapping rules from YARRRML in a turtle-based serialization of RML or R2RML.

Installation:

pip install yatter

Execution from CLI

To execute from command line run the following:

  • From YARRRML to [R2]RML
python3 -m yatter -i path_to_input_yarrrml.yml -o path_to_rdf_mapping.ttl [-f R2RML]
  • From [R2]RML to YARRRML
python3 -m yatter -i path_to_input_rdf_mapping.ttl -o path_to_output_yarrrml.yml [-f R2RML]

-f R2RML is an optional parameter for translating input YARRRML to R2RML (and inverse)

Execution as a library

If you want to include the module in your implementation:

  • for translating YARRRML mapping to RML mappings (and inverse):
import yatter
from ruamel.yaml import YAML
# YARRRML to RML
yaml = YAML(typ='safe', pure=True)
rml_content = yatter.translate(yaml.load(open("path-to-yarrrml")))
# RML to YARRRML
yarrrml_content = yatter.inverse_translate("rdf_mapping_content")
  • for translating YARRRML mappings to R2RML mappings (and inverse):
import yatter
from ruamel.yaml import YAML

R2RML_URI = 'http://www.w3.org/ns/r2rml#'
# YARRRML to R2RML
yaml = YAML(typ='safe', pure=True)
rml_content = yatter.translate(yaml.load(open("path-to-yarrrml")), mapping_format=R2RML_URI)
# R2RML to YARRRML
yarrrml_content = yatter.inverse_translate("rdf_mapping_content", mapping_format=R2RML_URI)
  • for merging TriplesMap based on id:
import yatter
list_yarrrml_mappings = ["content_mapping_yarrrml1", "content_mapping_yarrrml1"]
yarrrml_content = yatter.merge_mappings(list_yarrrml_mappings)

Specifications conformant:

These are the following specifications used by the translation process:

To be implemented soon:

Cite this work:

If you used Yatter in your work, please cite the ICWE2023 paper:

@inproceedings{iglesias2023human,
  title={Human-Friendly RDF Graph Construction: Which One Do You Chose?},
  author={Iglesias-Molina, Ana and Chaves-Fraga, David and Dasoulas, Ioannis and Dimou, Anastasia},
  booktitle={International Conference on Web Engineering},
  pages={262--277},
  year={2023},
  doi={10.1007/978-3-031-34444-2_19},
  organization={Springer}
}

Authors

Ontology Engineering Group:

  • David Chaves-Fraga
  • Marino González García (Final bachelor thesis - Systematic Testing)
  • Luis López Piñero (Final bachelor thesis - v0.1)

yatter's People

Contributors

dachafra avatar leviheichou avatar luislopezpi avatar daniel-dona avatar arenas-guerrero-julian avatar shakeel26 avatar ocorcho avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.