You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Willie Milnor <mi...@gmail.com> on 2014/07/23 17:37:11 UTC

Re: Scoring mechanism not working in jena-text 1.0.0

Has there been any progress on implementing scoring in jena-text?


On Wed, Mar 12, 2014 at 5:40 AM, Andy Seaborne <an...@apache.org> wrote:

> On 11/03/14 11:20, Harkishan Singh wrote:
>
>> Thanks Andy Seaborne for the reply.
>>
>> Can I use the same approach for finding score as we have in LARQ
>> framework.
>> I mean by reusing some part of LARQ code??
>>
>
> LARQ is completely different internally from jena-text.  Even the Lucene
> document index is different.  The code can't be reused but the way it
> handles property functions is similar.
>
> It shouldn't be too hard to add score handling to jena-text (for Lucene
> and for Solr) if you want to have a go at doing that.  TextQueryPF is the
> place for catching text:query.
>
>         Andy
>
>
>>
>> On Tue, Mar 11, 2014 at 4:30 PM, Andy Seaborne <an...@apache.org> wrote:
>>
>>  On 11/03/14 08:38, Harkishan Singh wrote:
>>>
>>>  Hi,
>>>> I download the source code of jena-text version 1.0.0 and found that
>>>> mechanism for finding score is not implemented (went through this file
>>>> TextQueryPF.javaTextQueryPF.java) where as in LARQ this mechanism was
>>>> there.
>>>>
>>>>
>>>> I'm not sure whether in version 1.0.1 they have implemented it.
>>>> I executed this query but didn't got any score.
>>>>
>>>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>>>> PREFIX text: <http://jena.apache.org/text#>
>>>> SELECT ?s ?score
>>>>     {?s text:query ("xyz" ?score ). }
>>>>
>>>>
>>> Things in the triple object position are argument to the property
>>> function
>>> - they need to be bound, they are not "out" parameters so score there is
>>> used to limit the results (not that it's implemented IIRC - awaiting a
>>> contribution).
>>>
>>> The intended design is that the subject position is used for output of
>>> the
>>> function (if already bound, it's effective a test of the right value).
>>>
>>> So it would be
>>>
>>> { (?s ?score) text:query ("xyz"). }
>>>
>>> but again not yet implemented.
>>>
>>>          Andy
>>>
>>>
>>>
>>>  Does any one have an idea whether in latest version 1.0.1 they have
>>>> implemented it or not.
>>>>
>>>> Thanks,
>>>> Harkishan Singh
>>>>
>>>>
>>>>
>>>
>>
>


-- 
Cheers,
Willie

Re: Scoring mechanism not working in jena-text 1.0.0

Posted by Andy Seaborne <an...@apache.org>.
On 23/07/14 16:37, Willie Milnor wrote:
> Has there been any progress on implementing scoring in jena-text?

Willie - would you like to develop a patch to add this to jena-text?  As 
an open source project, it's contributions that drive progress.

	Andy

>
>
> On Wed, Mar 12, 2014 at 5:40 AM, Andy Seaborne <an...@apache.org> wrote:
>
>> On 11/03/14 11:20, Harkishan Singh wrote:
>>
>>> Thanks Andy Seaborne for the reply.
>>>
>>> Can I use the same approach for finding score as we have in LARQ
>>> framework.
>>> I mean by reusing some part of LARQ code??
>>>
>>
>> LARQ is completely different internally from jena-text.  Even the Lucene
>> document index is different.  The code can't be reused but the way it
>> handles property functions is similar.
>>
>> It shouldn't be too hard to add score handling to jena-text (for Lucene
>> and for Solr) if you want to have a go at doing that.  TextQueryPF is the
>> place for catching text:query.
>>
>>          Andy
>>
>>
>>>
>>> On Tue, Mar 11, 2014 at 4:30 PM, Andy Seaborne <an...@apache.org> wrote:
>>>
>>>   On 11/03/14 08:38, Harkishan Singh wrote:
>>>>
>>>>   Hi,
>>>>> I download the source code of jena-text version 1.0.0 and found that
>>>>> mechanism for finding score is not implemented (went through this file
>>>>> TextQueryPF.javaTextQueryPF.java) where as in LARQ this mechanism was
>>>>> there.
>>>>>
>>>>>
>>>>> I'm not sure whether in version 1.0.1 they have implemented it.
>>>>> I executed this query but didn't got any score.
>>>>>
>>>>> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
>>>>> PREFIX text: <http://jena.apache.org/text#>
>>>>> SELECT ?s ?score
>>>>>      {?s text:query ("xyz" ?score ). }
>>>>>
>>>>>
>>>> Things in the triple object position are argument to the property
>>>> function
>>>> - they need to be bound, they are not "out" parameters so score there is
>>>> used to limit the results (not that it's implemented IIRC - awaiting a
>>>> contribution).
>>>>
>>>> The intended design is that the subject position is used for output of
>>>> the
>>>> function (if already bound, it's effective a test of the right value).
>>>>
>>>> So it would be
>>>>
>>>> { (?s ?score) text:query ("xyz"). }
>>>>
>>>> but again not yet implemented.
>>>>
>>>>           Andy
>>>>
>>>>
>>>>
>>>>   Does any one have an idea whether in latest version 1.0.1 they have
>>>>> implemented it or not.
>>>>>
>>>>> Thanks,
>>>>> Harkishan Singh
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>