Giter Club home page Giter Club logo

Comments (8)

anaigmo avatar anaigmo commented on June 25, 2024 2

Hi @pawelostr, @arenas-guerrero-julian,

I've tried with the example provided and it is a mistake in the mapping, morph works fine. With the attached mapping and v2.6.0 I get as result nested quoted triples.

animals-test-rmlstar.zip

from morph-kgc.

arenas-guerrero-julian avatar arenas-guerrero-julian commented on June 25, 2024 2

Thanks for checking this @anaigmo

from morph-kgc.

arenas-guerrero-julian avatar arenas-guerrero-julian commented on June 25, 2024

Hi @pawelostr ,

I just tried your example with Morph-KGC v 2.4.0 and with the latest version available in the repository and it is working correctly generating all the triples. I am on Ubuntu. CI test cases pass on python 3.11 and MacOS.

I wonder if it could be your MacOS version. Please try on another OS.

Julián

from morph-kgc.

pawelostr avatar pawelostr commented on June 25, 2024

Hi Julián,

So I've tried the mappings on Windows 11 22H2 with Python 3.9.13 and in Google Colab, and unfortunatelly the result it still the same - no triples from <#outerTriplesMap> are generated.

Below is a script for Colab, in which exactly 0 triples are generated, as to exacerbate the problem I've switched <#innerTriplesMap> and <#middleTriplesMap> to rml:NonAssertedTriplesMap.

!pip install morph-kgc
!git clone https://gitlab.com/pawelostr/rdf-star-animals.git
!echo "[Something]" > /content/rdf-star-animals/config-temp.ini
!echo "mappings=animals.ttl" >> /content/rdf-star-animals/config-temp.ini
!cd /content/rdf-star-animals && python3 -m morph_kgc config-temp.ini

On a side note, I've tried almost every combination of NonAssertedTriplesMap, AssertedTriplesMap, TriplesMap, and all the combinations of prefixes from RML and R2RML to no avail.

Edit: So I also tested it on up-to-date Arch with python 3.11.3 in conda env on 2.5.1, and again only inner and mid triples are generated.

from morph-kgc.

arenas-guerrero-julian avatar arenas-guerrero-julian commented on June 25, 2024

Hi @pawelostr ,

I tried again and it is working.

Julián

from morph-kgc.

pawelostr avatar pawelostr commented on June 25, 2024

Hey @anaigmo @arenas-guerrero-julian,

There was indeed an error in my original example, as I've mixed some old and new stuff, and @anaigmo 's works in both 2.5.1 and 2.6.0.

For posteriority I'll leave a modified one that's fully on rml prefix http://w3id.org/rml/, that's cohesive with morph rml-star test cases as of 2.6.0.

animals-full-rml.ttl.txt

from morph-kgc.

arenas-guerrero-julian avatar arenas-guerrero-julian commented on June 25, 2024

This issue is related to #124

from morph-kgc.

pawelostr avatar pawelostr commented on June 25, 2024

Unfortunately the original diagnosis (#174 (comment)) was wrong, and uploaded example mapping was not representative of the issue at hand.

(producing no double quoted triples most of the time, in some cases there will be one triple generated)

only the second part is the problem, first is a problem of incorrect mappings that have been created during attemps at diagnosis of the bug.

What Happens?

If a second level of deeply nested quoted triples is attempted to be generated (<< << < s p o > p1 o1 >> p2 o2 >>) and there's more than one predicateObjectMap (whether as a predicateObjectMap or as a class in subjectMap) in a base (the < s p o >) AssertedTriplesMap or NonAssertedTriplesMap, only one triple is generated.

To Reproduce

Run test/issues/issue_174 (tests a and b will fail, c will pass) on a pre-pull request no 177 (<=2.6.0) morph-kgc.

Resolution

Pull request no. 177 fixes described problem and 178 adds additional tests.

from morph-kgc.

Related Issues (20)

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.