Hi, So, when you need to write complex queries not handled by natural language rules what is the alternative?
On Tue, Jun 18, 2013 at 12:21 PM, Denis Steckelmacher <[email protected]>wrote: > On 06/18/2013 12:01 PM, Ignacio Serantes wrote: > > Hi, > > > > I'm a little bit confused. I understood that there are three steps in > > this process "natural query language"->"formal query language"->SPARQL > > queries but there is no trace of the "formal query language" syntax. > > > > You are right, there is no "formal query language" syntax. The parser > works by incrementally translating natural language into > Nepomuk2::Query::Term objects. > > The first parsing step is to split the query in terms (a term is a word > separated by a space or a punctuation character, or words enclosed into > quotes). Each term is a Nepomuk2::Query::Term having a string value. > > Then, rules are applied on these terms. They are locale-specific and > parsed from strings that can be translated using i18nc() calls. For > instance, the rule "sent by %1" transforms the three terms "sent by Michel" > into the comparison term "nmo:messageFrom=Michel". > > When no more rule matches, the third step is to fuse them inside a big AND > comparison. This big AND is the final query, that will be like > > resourceType=nmo:Email AND nmo:messageFrom=Michel AND > nmo:messageTitle:Holidays > > > ______________________________**_________________ > Nepomuk mailing list > [email protected] > https://mail.kde.org/mailman/**listinfo/nepomuk<https://mail.kde.org/mailman/listinfo/nepomuk> > -- Best wishes, Ignacio
_______________________________________________ Nepomuk mailing list [email protected] https://mail.kde.org/mailman/listinfo/nepomuk
