Hello everybody,
I would like to know if it is possible to export a complete VocBench project.
I can't find a way to generate a complete file with all the data.
Thanks and happy week to all.
Zaida Bartolomé-Díaz
University of Las Palmas de Gran Canaria (Spain)
Thanks !
Yes, I’ve a Ontolex project too.
I can obtain a file but when I open it in Notepad++ for instance, I only can read the description, not really the data.
Is there a way to obtain a simplified file with only the project data (entries)?
Thank you.
De : vocben...@googlegroups.com <vocben...@googlegroups.com> De la part de Roland Wingerter
Envoyé : jeudi 13 mai 2021 12:01
À : vocbench-user <vocben...@googlegroups.com>
Objet : [vocbench-user] Re: Export data from VocBench
--
You received this message because you are subscribed to the Google Groups "vocbench-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vocbench-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/07717472-26d6-4dda-8d58-d8f5fefddf7an%40googlegroups.com.
Dear Zaida,
I think we by first need to understand what you mean by “description” vs “data”. Indeed, all the data is in the export.
If you could write us an excerpt of what you found on the notepad file and what you expected to find (so to have a clear record of the gap between desiderata and obtained results) we could provide you with some assistance.
Basically, VB conforms to interchange standards for RDF (that is, serialization formats for RDF) and…that’s it, there’s not much to do :-)
A couple of things that are available are:
Kind Regards,
Armando
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/f0e0c302-3854-4e6e-846c-295aeff4db41n%40googlegroups.com.
Hi Roland,
VB does (should, at least :D ) not write on the default graph. It could be that you imported some data that was expressed in a quad format and which contained explicitly data in the default, unnamed, graph…or there’s a bug somewhere.
In order to replicate the error…did you load exactly the file that is linked on our test drive (the one you linked) or you opened a new version?
Kind Regards,
Armando
From: vocben...@googlegroups.com <vocben...@googlegroups.com>
On Behalf Of Roland Wingerter
Sent: Thursday, May 13, 2021 12:01 PM
To: vocbench-user <vocben...@googlegroups.com>
--
Hi,
Yes, well, it's probably my fault because I don't know how to read the file. 😉
When I open it in Notepad++ I get up to the line 13156:
rdf:Description rdf:about=http://www.w3.org/2004/02/skos/core#broaderTransitive>
<rdfs:label xml:lang="en">has broader transitive</rdfs:label>
<rdfs:isDefinedBy rdf:resource=http://www.w3.org/2004/02/skos/core/>
<skos:definition>skos:broaderTransitive is a transitive superproperty of skos:broader.</skos:definition>
<skos:scopeNote xml:lang="en">By convention, skos:broaderTransitive is not used to make assertions. Rather, the properties can be used to draw inferences about the transitive closure of the hierarchical relation, which is useful e.g. when implementing a simple query expansion algorithm in a search application.</skos:scopeNote>
<rdf:type rdf:resource=http://www.w3.org/2002/07/owl#ObjectProperty/>
<rdfs:subPropertyOf rdf:resource=http://www.w3.org/2004/02/skos/core#semanticRelation/>
<rdf:type rdf:resource=http://www.w3.org/2002/07/owl#TransitiveProperty/>
<owl:inverseOf rdf:resource=http://www.w3.org/2004/02/skos/core#narrowerTransitive/>
<rdf:type rdf:resource=http://www.w3.org/1999/02/22-rdf-syntax-ns#Property/>
</rdf:Description>
<rdf:Description rdf:about=http://www.w3.org/2004/02/skos/core#narrowerTransitive>
<rdfs:label xml:lang="en">has narrower transitive</rdfs:label>
<rdfs:isDefinedBy rdf:resource=http://www.w3.org/2004/02/skos/core/>
<skos:definition>skos:narrowerTransitive is a transitive superproperty of skos:narrower.</skos:definition>
<skos:scopeNote xml:lang="en">By convention, skos:narrowerTransitive is not used to make assertions. Rather, the properties can be used to draw inferences about the transitive closure of the hierarchical relation, which is useful e.g. when implementing a simple query expansion algorithm in a search application.</skos:scopeNote>
<rdf:type rdf:resource=http://www.w3.org/2002/07/owl#ObjectProperty/>
<rdfs:subPropertyOf rdf:resource=http://www.w3.org/2004/02/skos/core#semanticRelation/>
<rdf:type rdf:resource=http://www.w3.org/2002/07/owl#TransitiveProperty/>
<owl:inverseOf rdf:resource=http://www.w3.org/2004/02/skos/core#broaderTransitive/>
<rdf:type rdf:resource=http://www.w3.org/1999/02/22-rdf-syntax-ns#Property/>
</rdf:Description>
And only on line 13157, I start to see my resource like this:
<rdf:Description rdf:about=https://lexinfo.net/ontology/2.0/lexinfo#limeLexicon_76911394>
<rdf:type rdf:resource=http://www.w3.org/ns/lemon/lime#Lexicon/>
<dct:title xml:lang="fr">Français</dct:title>
<lime:language rdf:datatype=http://www.w3.org/2001/XMLSchema#language>fr</lime:language>
</rdf:Description>
<rdf:Description rdf:about=https://lexinfo.net/ontology/2.0/lexinfo#limeLexicon_aa53b16b>
<rdf:type rdf:resource=http://www.w3.org/ns/lemon/lime#Lexicon/>
<dct:title xml:lang="es">Español</dct:title>
<lime:language rdf:datatype=http://www.w3.org/2001/XMLSchema#language>es</lime:language>
</rdf:Description>
<rdf:Description rdf:about=https://lexinfo.net/ontology/2.0/lexinfo#ontolexLexicalEntry_pretensado-n>
<rdf:type rdf:resource=http://www.w3.org/ns/lemon/ontolex#LexicalEntry/>
<ontolex:canonicalForm rdf:resource=https://lexinfo.net/ontology/2.0/lexinfo#ontolexForm_05b22335/>
<lime:language rdf:datatype=http://www.w3.org/2001/XMLSchema#language>es</lime:language>
<ontolex:reference rdf:resource=https://www.construmatica.com/construpedia/Hormig%C3%B3n_Pretensado/>
</rdf:Description>
<rdf:Description rdf:about=https://lexinfo.net/ontology/2.0/lexinfo#ontolexForm_05b22335>
<rdf:type rdf:resource=http://www.w3.org/ns/lemon/ontolex#Form/>
<ontolex:writtenRep xml:lang="es">pretensado</ontolex:writtenRep>
</rdf:Description>
…
And in between some other descriptions, like on line 13575:
<rdf:Description rdf:about=http://www.w3.org/ns/lemon/lexicog#UsageExample>
<rdfs:comment xml:lang="nl">De klasse UsageExample representeert een tekstueel voorbeeld van het gebruik van een zin binnen een gegeven lexicografisch item. Een gebruiksvoorbeeld kan verscheidene tekstwaardes groeperen, waarbij deze waardes dezelfde betekenis duiden. Indien zulke waardes in verschillende talen zijn vastgelegd, kunnen ze dus geïnterpreteerd worden als vertalingen van elkaar.</rdfs:comment>
<rdfs:comment xml:lang="es">La clase UsageExample representa un ejemplo textual del uso de un sentido en un registro lexicográfico dado. Un ejemplo de uso puede agupar varios valores de cadenas de caracteres, en cuyo caso dichos valores codifican el mismo significado. Por tanto si dichos valores se expresan en distintos idiomas pueden ser interpretados como traducciones.</rdfs:comment>
<rdfs:comment xml:lang="en">The class UsageExample represents a textual example of the usage of a sense in a given lexicographic record. A usage example can group several string values, in which case they will encode the same meaning. Thus, if such values are expressed in different languages, they can be interpreted as translations.</rdfs:comment>
<rdfs:label xml:lang="es">ejemplo de uso</rdfs:label>
<rdfs:label xml:lang="nl">gebruiksvoorbeeld</rdfs:label>
<rdfs:label xml:lang="en">usage example</rdfs:label>
</rdf:Description>
If you tell me this is normal, perfect.
Just one more question, if I modify my file off-line, can I import it again in VocBench?
Thanks a lot!!
Zaida Bartolomé-Díaz
University of Las Palmas de Gran Canaria (Spain)
De : Armando Stellato <sta...@outlook.it> De la part de Armando Stellato
Envoyé : jeudi 13 mai 2021 15:30
À : zaidaba...@gmail.com; vocbench-user <vocben...@googlegroups.com>
Cc : Roland Wingerter <chun...@gmail.com>
Objet : RE: [vocbench-user] Re: Export data from VocBench
Hi Zaida,
This is RDF/XML export and it’s normal data description. If you select other options for RDF/XML, or, much better, other formats, you can see in a even more readable form.
I would suggest to choose Turtle and then, in the configuration options, select true for all of them (they will enable a more conflated representation).
Obviously, some familiarity with the format [1] would help :D
The fact that you see all that data before line 13157 is not normal. I explain to you how it works. When you export data, VB3 prompts you with some options, which are however defaulted to the most common configuration, so that you can just click on export and that’s all.
One option is related to the graphs being exported. See below an example for the English wordnet:
By default, only the graph of the data you are editing is selected. The definitions of the SKOS vocabulary that you are reporting to us shouldn’t be exported. My guess is that:
In any case, yes, you can edit your file manually and then reimport it in VB3. However, you do it at your own risk. If you mess up with the format, you might end up in a corrupted file. If you limit yourself to edit the literal content, there should be no problem though
Kind Regards,
Armando
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/02eb01d74808%248f9b5920%24aed20b60%24%40gmail.com.
Thanks Roland for following up,
I’ve seen your file and it’s just triples (if they were quadruples and the graph was the null graph, that would explain it already) so the file per se is not an issue.
It might be the way you loaded it. Did you edit these definitions through VB, or you loaded the data? And in the latter case, how did you load the data? Through VB or through GDB?
Cheers,
Armando
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/53eca08d-a3d6-4b13-a6ae-940ffda36c43n%40googlegroups.com.
Dear Roland, all,
just to close the thread, Roland informed me that he recreated everything from scratch and there was no issue then, so it must have been some tinkering with the data that created the information in the null graph.
So, I thought it might be worth adding some more background information about it. Pls notice that this background is not specific to VB, but it’s mostly RDF stuff and, in part, related to RDF4J, the middleware used by VB for storing data.
By first, “default graph”, “null graph” etc…
Well, if it makes you feel better, even the specs are not that clear :D
1. SPARQL QUERY defines a Dataset's "default graph" as a defineable graph which is either
* the "RDF Merge" of all named graphs, if no FROM/FROM NAMED clause is given
* the dynamic "RDF Merge" of the sole graphs specified in one or more FROM clause
2. SPARQL UPDATE defines a "Graph Store" 's "default graph" as the unique "UNNAMED GRAPH" in the store. If no graph is specified in an update, the information is stored in the unnamed graph.
So, as you can see the definition of “default graph” depends on the context, and it’s rather dynamic in the case of queries. When we mention “default graph” here, we are talking about the one as specified in the SPARQL UPDATE specs, the Graph Store’s one.
Why also called “null graph” ? Well, historically, Sesame (the library/framework which later became RDF4J), before the introduction/definition of Named Graphs in RDF, introduced its own notion of graph calling it “context”. It’s a fourth element in a triple and can be used to “contextualize” a certain number of triples (for various matters, mostly, provenance) into a given section of the global dataset. As it corresponds (see definition before) to an unnamed graph, it has no name and thus it has the value _null_ in Java, which is the programming language used for Sesame/RDF4J. So the Graph Store/SPARQL UPDATE’s default graph corresponds quite aderently to RDF4J’s null context. The expression null graph is also sometimes used.
One curiosity: there is no way to indicate the "Graph Store"'s default graph in a SPARQL QUERY by merely following the specs. The keyword GRAPH in the SPARQL query language expects (when grounded) a URI, and there’s no way to address explicitly the default, unnamed, graph. RDF4J features a non standard extension to SPARQL in which the sesame:nil URI is associated to it, so that it can be specifically addressed.
Back to your case: any UPDATE in SPARQL adding some data, or load of data through, for instance, API (web or software, i.e. through RDF4J), or through a UI that doesn’t’ specific the graph where the data is stored, would result in storing the data on the default graph. Conversely, VocBench doesn’t write on the default graph; it creates and associates a graph with the same URI of the baseuri of the dataset being managed, for storage of all working data in the dataset. Different operations may write on different names graphs. E.g. if an ontology is imported, it is stored in a dedicated graph having as URI the same URI of the ontology being imported. So, for instance, if you import the FOAF ontology (uri: http://xmlns.com/foaf/0.1/) its data will be stored in a graph with URI http://xmlns.com/foaf/0.1/ .
Conversely, if data is “loaded” within the dataset being edited, it is supposed to be loaded within the graph containing the “working data” which, like I said, corresponds to the baseuri of the dataset itself.
So, in short, all operations performed though the UI of VB, should never end up in data being added to the default graph (unless playing with SPARQL, in that case you can do anything with an UPDATE, even from within the SPARQL UI of VB). Through other means (e.g. the workbench of GraphDB or the one of RDF4J, other software connecting to the triple store etc..) the data, unless the graph is specified, will – with almost any probability – end up in the default graph.
Kind regards,
Armando
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/3ef5f346-1458-4b05-91cc-f275df147781n%40googlegroups.com.
Dear Charly,
thanks for reporting this. Just a question, did you check those triples before deleting them? Were them part of some original data that you loaded originally? One possibility could be that you had your data in a quad format and then loaded it, in that case the information about the graphs of the quad format is preserved and, if you had data in the unnamed graph, then it would have been loaded there as well.
Another possibility is that (as Roland did in the original emails of the thread) you have performed a SPARQL update inserting some data without putting it into a graph.
I’m asking this because this has never occurred to us and indeed there should be no point in the code where VB writes to the unnamed graph. However, I prefer to ask in case you are able to trace the origins of the data and, possibly, help us to spot a potential bug (but, like I said, I’m pretty sure the data in the null graph was originated because of some explicit operation).
Kind Regards,
Armando
P.S. just for sake of completeness, as in most cases what you did will be enough. Your update does not assure 100% that all data in the unnamed graph will be deleted. If a triple is present both in the unnamed graph and in some other graph then the NOT EXISTS filter will leave it out and the update won’t remove it. Explicit reference to the null context through sesame:nil (which is local to RDF4J technology, but that’s what VB is using, whether the triple store is RDF4J or GDB) is the only way to be 100% sure that you are pinpointing data in the unnamed graph.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/6ea87d53-8244-4292-8d44-bb4103876e87n%40googlegroups.com.
Dear Otso,
As reported here: http://vocbench.uniroma2.it/doc/sys/#separate_triple_store you should use version 9.8.1 of GDB with 10.1.1. The download link to GDB is on that page and paragraph. It is necessary due to GDB abandoning the old indexing system that is exploited by VB. With 9.9, search won’t work.
I don’t think though that your problem is due to that (the rest of the interaction with GDB should work).
There are a few points that I don’t get from your description:
One educated guess: you not only created the repo from GDB, but also loaded the data from GDB. If you didn’t specify anything, the data was loaded in the default graph, except that VB does not load the data in the default graph :-)
Advise: do not do anything directly from GDB (ok, reading is fine :D ). Like I said in the first point here above, let VB do the stuff. Accessing an existing repo works seamless if the repo had already been prepared by VB. If it has not, then you should perform, directly on GDB, the same actions that VB does, but you should know exactly what you need to do. Anyway, the basic requirement is that the data is loaded in a graph that has the same URI of the baseuri of your project.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/6be99719-affd-40a8-80cf-98cebcba62d5n%40googlegroups.com.
Hi Otso,
I still believe that it was something different. The null graph was probably generated when you created the data directly in GDB, while possibly you had some other issue initially with 9.9. However, all’s well that ends well, and I wouldn’t dig deeper into it if now it works for you on 9.8.1 :-)
Kind Regards,
Armando
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/a7ee3875-76c3-45fb-bb6c-1109686ba092n%40googlegroups.com.
Dear Vito,
I see your message follows up on previous comments. Quite busy now so can’t go through all of them (I was checking whether I could get back some background info in addition to your question) but from a quick skim I see we provided information about the sesame:nil graph, which was a reference to the unnamed graph.
However, the thing doesn’t work the other way round; i.e. the query isn’t supposed to return the unnamed graph (how would it be? A bnode unbound to anything?) so the behavior seems consistent with what I’d expect (and what SPARQL should return)
Kind Regards,
Armando
To view this discussion visit https://groups.google.com/d/msgid/vocbench-user/f89b6cf9-d20c-4605-a31c-81c99659602en%40googlegroups.com.