semweb | Generic Scala/ScalaJS semantic web library
kandi X-RAY | semweb Summary
kandi X-RAY | semweb Summary
SemWeb (Semantic Web) is a generic Scala/ScalaJS semantic web library that can be used both on client and server sides. The lib is at rather early stage but is already used in some webapps. Only a part of what is planned has been implemented, in general you should use the lib when: * you want to have same rdf-related classes and use them both on frontend/backend. In such case prickle scalajs does serialization job and, implicit sesame/jena conversions will allow you to send quries in easy format [works] * are tired of writing string for SPARQL queries and want a DSL that will let you create quries in convenient type-safe manner [partially done] * want to validate the data entered by users at client or server. For this purpose ShEx is used. [in development] * want to generate SPARQL updates from annotated scala classes [not yet started].
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of semweb
semweb Key Features
semweb Examples and Code Snippets
Community Discussions
Trending Discussions on semweb
QUESTION
I have a Nodeshape with a sh:SPARQLTarget
and a sh:SPARQLRule
. I tried to run both Target and Rule as Queries and both deliver results, but when I'm executing the Shapes with the Apache Jena SHACL Processor, it won't construct any triples. Did I do something wrong? I'm out of ideas.
Here is my Nodeshape:
ANSWER
Answered 2021-Jan-29 at 00:44Without looking at details, the sh:Target needs to be sh:target with lower-case t. All property names are typically lower-case.
QUESTION
I am trying to use FnO functions in RML mapper (I like to do a string_split
like here).
This is how my folder looks like:
I am executing java -jar "rmlmapper.jar" -m mapping-cuisines.ttl -o output-cuisines.ttl -s turtle
However, when I try implementing a <#FunctionMap>
i get the following error message:
ANSWER
Answered 2021-Mar-17 at 15:39I tried out your mapping file and it works correctly.
Your current mapping file transforms the data in the spicy
to upper case
and generates the specified RDF triples.
Since the function grel:toUpperCase
is included in the RMLMapper by default,
you don't need to functions.ttl
to specify these functions.
This is only necessary if you want to add your own custom functions.
An overview of all included functions in the RMLMapper can be found here: https://rml.io/docs/rmlmapper/default-functions/
- Download the latest RMLMapper from our Github repository: https://github.com/RMLio/rmlmapper-java/releases
- Run it as:
java -jar -m mapping.rml.ttl
- I get the output which is listed below.
mapping.rml.ttl
QUESTION
I am using RML-Mapper library in order to convert xml file into rdf file. For the following xml file, catalogs.xml, I am having troubles to write the best mapping.ttl. My question is, what is the best mapping.ttl file for that specific xml? I provide catalogs.xml and catalog_mapping.ttl files below...
Catalogs.xml file
...ANSWER
Answered 2020-May-12 at 07:29The mapping rules are already quite good, I did the following improvements:
rr:
should not be used as prefix for your own TriplesMaps. Therr
prefix is defined by the R2RML specification. To solve this, I added@base http://example.org
and removed therr
prefix of the TriplesMaps:
QUESTION
Trying to save rdf triples to a file using the semweb package in swi-prolog, but keep getting an error and the triples are not saved correctly.
The following small code shows the problem with swi-prolog version 7.6.4 on Ubuntu Bionic.
PS: Please ignore the 'rdf:xyz' predicate as I tend to use it without needing to add new prefixes
...ANSWER
Answered 2019-Jan-07 at 04:47Based on my first glance at the docs, I think you should try passing an atom instead of a Prolog string, i.e.
QUESTION
SWI-prolog version: threaded, 64 bits, version 7.6.4 OS: Ubuntu bionic 18.04
Still working on learning prolog and ran into an interesting situation. I would like to use a predicate that is 'asserted' over multiple files (just makes the code look a little cleaner in organization), but that predicate also needs to be able to process rdf prefixes as part of the semweb package and it does not seem to work.
Here is a code block that might show the problem:
...ANSWER
Answered 2018-Dec-18 at 22:10I think I figured out. multifile
and rdf_meta
do work together. The bug in the code was related to the fact that I had defined foo
in rdf_meta as foo(r)
. I think that expansion was causing confusion at compile time with regards to pattern match. Changing the definition to foo(-)
fixed the problem. Hope this helps someone in the future.
QUESTION
Being new to prolog I am reading existing code (as well as trying to write some code). Having some prior background in semweb I started to play with it and see something that is confusing me. Example assertion:
...ANSWER
Answered 2018-Nov-21 at 14:48Prolog is not a functional language. This implies 2+3
does not evaluate to 5
and is just a term that gets meaning from the predicate that processes it. Likewise, ex:bob
is just a term that has no direct relations to modules or
predicates. Only predicates such call/1 will interpret this as "call bob
in the module ex
".
Next to that, (SWI-)Prolog (most Prolog's, but not all) have term expansion that allows you to rewrite the term that is read before it is handed to the compiler. That is used to rewrite the argument of rdf/3
: each appearance of prefix:local
is expanded to a full atom. You can check that by using listing/1
on predicates that call rdf/3 using the prefix notation.
See also rdf_meta
QUESTION
I'm setting up a toxi tagging system for some articles, and am using this query as a starting point for testing...
...ANSWER
Answered 2018-Mar-21 at 13:26First, don't use GROUP BY
when you don't use aggregates in the results. MySQL allows you to use it without aggregates, but it produces random results. I assume you're using it here because including userExcludedArticles
table gave you duplicates of the rows. That's not the proper way to handle it.
As your query is now written it will check every row in userExcludedArticles
against every row in articles
/tag
/tagmap
and if there is a row which doesn't have the article id it can be shown. This is why the articles aren't hidden.
You need to use NOT EXISTS
clause to check for this:
QUESTION
I want to iterate XML node with iteration without id attribute as in my code is it possible?. I am a beginner in RML mapping language. I am using the RML Mapping tool its link is here https://github.com/RMLio/RML-Mapper
I have iterate successfully with using "ID" but I don't want to iterate with id because my XML data doesn't contain id so is it possible to do it without ID attribute or it's compulsory to use the id to iterate in RML Mapping. PLease give you suggestions
here is my XML file data
...ANSWER
Answered 2018-Jan-08 at 09:10In your current mapping you aren't iterating using the id attribute. Since your iterators are
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install semweb
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page