[Nepomuk] Status report of the Nepomk query parser

Ignacio Serantes kde at aynoa.net
Tue Jun 18 13:57:44 UTC 2013


Hi

Ok, I will show the results because those are the important in this case
but natural language is not particularly accurate for querying data and,
considering there is no natural language alternative to SQL in more than 3
decades and personal assistants like SIRI sometime are not very smart, I
not sure as you about your assertion relative to natural language :).

On the other side I have a warning about Nepomuk::Query. I tried to use
when I started developing Nepoogle and I discovered severe performance
flaws with several terms (more than 4 or 5) causing virtuoso-t consuming
100% because long SPARQL queries without subqueries.

I did not test it in last two years but considering
Nepomuk2::Query:QueryParser() has the same problem probably this was not be
solved. If you don't test it I think you must only to confirm it's working
as expected.



On Tue, Jun 18, 2013 at 3:28 PM, Denis Steckelmacher <steckdenis at yahoo.fr>wrote:

> On 06/18/2013 12:25 PM, Ignacio Serantes wrote:> Hi,
>
> >
> > So, when you need to write complex queries not handled by natural
> > language rules what is the alternative?
>
> Hi,
>
> The parser will support nested queries (I'm working on them right now),
> and nothing prevents me to add a rule "%1 : %2" that converts an arbitrary
> property name and a value to a key:value filter.
>
> I think that what can be expressed in natural language can be expressed
> formally, but only experiments will show if I'm right. I'll keep in mind
> your remark.
>
> Denis.
>
>
> >
> > On Tue, Jun 18, 2013 at 12:21 PM, Denis Steckelmacher
> > <steckdenis at yahoo.fr <mailto:steckdenis at yahoo.fr>> 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
> Nepomuk at kde.org
> https://mail.kde.org/mailman/**listinfo/nepomuk<https://mail.kde.org/mailman/listinfo/nepomuk>
>



-- 
Best wishes,
Ignacio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130618/2ffe3dca/attachment.html>


More information about the Nepomuk mailing list