Skip to content

Filter a language typed string & use it without language tag #68

Answered by phochste
ktk asked this question in Q&A
Discussion options

You must be logged in to vote

The built-in log:langlit could also be used.

@prefix : <urn:example.org:> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .

:Cat a :Animal ;
    :label "cat"@en , "chat"@fr , "kat"@nl, "kucing"@id .

{
    ?Subject :label ?Label .
    ( ?LabelText "id" ) log:langlit ?Label .
}
=>
{
    ?Subject :lang ?LabelText .
} .

which gives after running eye --pass --nope --quiet test.n3 :

@prefix : <urn:example.org:>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.

<urn:example.org:Cat> a <urn:example.org:Animal>.
<urn:example.org:Cat> <urn:example.org:label> "cat"@en.
<urn:example.org:Cat> <urn:example.org:label> "chat"@fr.
<urn:example.org:Cat> <urn:example.org:label> "kat"@nl.
<urn:ex…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@ktk
Comment options

Comment options

You must be logged in to vote
2 replies
@ktk
Comment options

@phochste
Comment options

Answer selected by ktk
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants