Hi Rafa,
(reply inline)
On 18/09/12 16:04, Rafa Haro wrote:
Why are we speaking in English compañero?? :-). Just joking.
Should we switch to German? ;-)
Thanks for your reply. I already tried concat function, but it has a strange
behaviour. For the example in the previous email, you would get
something like this:
<arrname="concepts">
<str>Orange (fruit) - dbpedia-owl:Plant
<http://dbpedia.org/ontology/Plant> dbpedia-owl:Eukaryote
<http://dbpedia.org/ontology/Eukaryote> dbpedia-owl:Species
<http://dbpedia.org/ontology/Species></str>
<str> Citrus </str>
</arr>
That's it, all the types are concatenated to the first label.
RDF is a multi-typed data model, therefore rdf:type expression wuuld be
evaluated in LDPath as a set of elements. There is fn:first() function,
but was designed for selecting the first non-empty path between a set
them, not for a unique path with more than one result.
Within LMF it'd be easy for you to add a new function to LDPath for such
purpose, but no sure how to actually do it in Apache Stanbol.
I also tried this:
concepts = fn:concat(rdfs:label[@en]," ", .) :: xsd:string;
because for me is also valid to associate labels with the URI of the
entity, but neither I get the expected result.
Really? This worked for me:
concepts = fn:concat(rdfs:label, " ", .) :: xsd:string ;
Greetings,
El 18/09/12 15:38, Sergio Fernández escribió:
Hi Rafa,
maybe you could try fn:concat() [1] for such purpose (I didn't test it):
concepts = fn:concat(rdfs:label, " - ", rdf:type) :: xsd:string ;
Unfortunately there is no any current built-in function for generating
CURIEs, so you'll have to settle with the type full URI.
Kind regards,
[1]
http://code.google.com/p/ldpath/wiki/PathLanguage#Builtin:_String_Concatenation
On 18/09/12 14:45, Rafa Haro wrote:
Hi again,
I have now a question about LDPath. I need to store in Solr entities'
labels along with its types using LDPath. I know that it's not possible
to have nested fields in Solr, but I was trying to get something like
this:
<arrname="concepts">
<str>Orange (fruit) - dbpedia-owl:Plant </str>
<str> Citrus - dbpedia-owl:Plant</str>
</arr>
I have tried several combinations using LDPath concatenation function,
but I think it's definitely not possible.
Any good idea?
Thanks to all for the help
Regards
This message should be regarded as confidential. If you have received
this email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard
copy by an authorised signatory.
Zaizi Ltd is registered in England and Wales with the registration
number 6440931. The Registered Office is 222 Westbourne Studios, 242
Acklam Road, London W10 5JJ, UK.
This message should be regarded as confidential. If you have received
this email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard
copy by an authorised signatory.
Zaizi Ltd is registered in England and Wales with the registration
number 6440931. The Registered Office is 222 Westbourne Studios, 242
Acklam Road, London W10 5JJ, UK.
--
Sergio Fernández
Salzburg Research
+43 662 2288 318
Jakob-Haringer Strasse 5/II
A-5020 Salzburg (Austria)
http://www.salzburgresearch.at