Language tags

0 views
Skip to first unread message

aarte...@gmail.com

unread,
Nov 9, 2015, 10:32:54 AM11/9/15
to Stardog

Is there a way to pull out language tags either on the web interface or via a get query? I have seen that someone has reported this issue, but I couldn't find an indication that this has been resolved.

Michael Grove

unread,
Nov 9, 2015, 10:37:00 AM11/9/15
to stardog
On Mon, Nov 9, 2015 at 10:32 AM, <aarte...@gmail.com> wrote:

Is there a way to pull out language tags either on the web interface or via a get query? I have seen that someone has reported this issue, but I couldn't find an indication that this has been resolved.


Sure, you can use the lang function in SPARQL [1].

Cheers,

Mike

 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Artemis Parvizi

unread,
Nov 10, 2015, 4:18:03 AM11/10/15
to Stardog
My problem is to actually display them. I don't know which fields have the language tags to use the lang to pull them. Is there no way I can actually display all of them when I request sparql results through an http request?

Michael Grove

unread,
Nov 10, 2015, 7:06:54 AM11/10/15
to stardog
On Tue, Nov 10, 2015 at 4:00 AM, Artemis Parvizi <aarte...@gmail.com> wrote:
My problem is to actually display them. I don't know which fields have the language tags to use the lang to pull them. Is there no way I can actually display all of them when I request sparql results through an http request?

What's wrong with using BIND + lang to bind the language of the literal to a variable which you can project out of the query?

Cheers,

Mike

Artemis Parvizi

unread,
Nov 11, 2015, 8:45:55 AM11/11/15
to Stardog

Nothing wrong with that if you KNOW exactly which label has a language tag. The query doesn't seem to return it at all other than you specifically request a lang(?s). Not everyone that deals with a new dataset is aware of the presence of a language tag. So, how do I display them in the first place without filtering them or binding them to a variable? for example in dbpedia you can see the language tags. Is there such a facility in Stardog?

Michael Grove

unread,
Nov 11, 2015, 9:08:52 AM11/11/15
to stardog
On Wed, Nov 11, 2015 at 8:45 AM, Artemis Parvizi <aarte...@gmail.com> wrote:
 

Nothing wrong with that if you KNOW exactly which label has a language tag. The query doesn't seem to return it at all other than you specifically request a lang(?s).

From your screenshot, ?s is an IRI, so it would never have a lang tag.  I'll guess that you meant ?label, but, based on your screen shot, they all have lang tags.  lang will return "" if the literal does not have a lang, so you can filter things that have, or do not have, a lang tag based on the result of that function.
 
Not everyone that deals with a new dataset is aware of the presence of a language tag. So, how do I display them in the first place without filtering them or binding them to a variable?

Display them where?
 
for example in dbpedia you can see the language tags. Is there such a facility in Stardog?

Are you expecting to see them in the webconsole? They will be display in the browser when viewing an individual.  They're not shown in query results unless selected explicitly via lang+bind, which is a known issue #2644.

Cheers,

Mike
Reply all
Reply to author
Forward
0 new messages