You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Pooja Verlani <po...@gmail.com> on 2011/06/23 07:32:29 UTC

Query time noun, verb boosting

Hi,

At the query time, I want to make the lucene query such that it should boost
only the noun from the query or some concept existing in the index. Are
there any possibilities or any possible ideas that can be worked around?


Regards,
Pooja

Re: Query time noun, verb boosting

Posted by Tommaso Teofili <to...@gmail.com>.
2011/6/23 Anshum <an...@gmail.com>

> Pooja,
> You could use UIMA (or any other) Parts of Speech Tagger. You could read a
> little more about it here.
>
> http://uima.apache.org/downloads/sandbox/hmmTaggerUsersGuide/hmmTaggerUsersGuide.html#sandbox.tagger.annotatorDescriptor
> This would help  you annotate and segregate nouns from verbs in the input.
> You could then aptly form the query.
> Perhaps this would take some effort but 'm assuming it'd work reasonably
> well.
>

I've done this recently using UIMA POS tagger and other annotators within a
TokenFilter to add TypeAttribute and PayloadAttribute to each token and
eventually filter/boost when searching.
Regards,
Tommaso




>
> --
> Anshum Gupta
> http://ai-cafe.blogspot.com
>
>
> On Thu, Jun 23, 2011 at 11:18 AM, Pooja Verlani <pooja.verlani@gmail.com
> >wrote:
>
> > Hi,
> >
> > Say for example, a query like "mammohan singh dancing", I am preferring
> to
> > make a compulsory condition on nouns to be searched but any verb isnt
> > important for me, I am preferring to extract results for manmohan singh
> and
> > not for dancing. If I can extract noun verb or can get to know that in my
> > index I have a concept of "manmohan singh" or an identity if not concept,
> I
> > would like to define rules for doing a strict(compulsory) match of
> > noun(concept) and loose match(non-compulsory boosting) for the verb.
> >
> > Basically, I want to avoid getting zero results for a compulsory match of
> > the 3 tokens(in this case manmohan singh dancing) of the query and
> instead
> > I
> > want to do a compulsory match on manmohan singh since that exists in my
> > index and "dancing" shouldn't be a compulsory match for non-zero number
> of
> > results.
> >
> > Hope this explains.
> > Any suggestions?
> >
> > Regards,
> > Pooja
> >
> >
> > On Thu, Jun 23, 2011 at 11:07 AM, Anshum <an...@gmail.com> wrote:
> >
> > > What would you mean by 'noun or some concept'. Would be better if you
> > could
> > > give a rather concrete example.
> > > About detecting parts of speech, you could use a lot of libraries but I
> > > didn't get about boosting terms from the Index.
> > >
> > >
> > > --
> > > Anshum Gupta
> > > http://ai-cafe.blogspot.com
> > >
> > >
> > > On Thu, Jun 23, 2011 at 11:02 AM, Pooja Verlani <
> pooja.verlani@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > At the query time, I want to make the lucene query such that it
> should
> > > > boost
> > > > only the noun from the query or some concept existing in the index.
> Are
> > > > there any possibilities or any possible ideas that can be worked
> > around?
> > > >
> > > >
> > > > Regards,
> > > > Pooja
> > > >
> > >
> >
>

Re: Query time noun, verb boosting

Posted by Anshum <an...@gmail.com>.
Pooja,
You could use UIMA (or any other) Parts of Speech Tagger. You could read a
little more about it here.
http://uima.apache.org/downloads/sandbox/hmmTaggerUsersGuide/hmmTaggerUsersGuide.html#sandbox.tagger.annotatorDescriptor
This would help  you annotate and segregate nouns from verbs in the input.
You could then aptly form the query.
Perhaps this would take some effort but 'm assuming it'd work reasonably
well.

--
Anshum Gupta
http://ai-cafe.blogspot.com


On Thu, Jun 23, 2011 at 11:18 AM, Pooja Verlani <po...@gmail.com>wrote:

> Hi,
>
> Say for example, a query like "mammohan singh dancing", I am preferring to
> make a compulsory condition on nouns to be searched but any verb isnt
> important for me, I am preferring to extract results for manmohan singh and
> not for dancing. If I can extract noun verb or can get to know that in my
> index I have a concept of "manmohan singh" or an identity if not concept, I
> would like to define rules for doing a strict(compulsory) match of
> noun(concept) and loose match(non-compulsory boosting) for the verb.
>
> Basically, I want to avoid getting zero results for a compulsory match of
> the 3 tokens(in this case manmohan singh dancing) of the query and instead
> I
> want to do a compulsory match on manmohan singh since that exists in my
> index and "dancing" shouldn't be a compulsory match for non-zero number of
> results.
>
> Hope this explains.
> Any suggestions?
>
> Regards,
> Pooja
>
>
> On Thu, Jun 23, 2011 at 11:07 AM, Anshum <an...@gmail.com> wrote:
>
> > What would you mean by 'noun or some concept'. Would be better if you
> could
> > give a rather concrete example.
> > About detecting parts of speech, you could use a lot of libraries but I
> > didn't get about boosting terms from the Index.
> >
> >
> > --
> > Anshum Gupta
> > http://ai-cafe.blogspot.com
> >
> >
> > On Thu, Jun 23, 2011 at 11:02 AM, Pooja Verlani <pooja.verlani@gmail.com
> > >wrote:
> >
> > > Hi,
> > >
> > > At the query time, I want to make the lucene query such that it should
> > > boost
> > > only the noun from the query or some concept existing in the index. Are
> > > there any possibilities or any possible ideas that can be worked
> around?
> > >
> > >
> > > Regards,
> > > Pooja
> > >
> >
>

Re: Query time noun, verb boosting

Posted by Pooja Verlani <po...@gmail.com>.
Hi,

Say for example, a query like "mammohan singh dancing", I am preferring to
make a compulsory condition on nouns to be searched but any verb isnt
important for me, I am preferring to extract results for manmohan singh and
not for dancing. If I can extract noun verb or can get to know that in my
index I have a concept of "manmohan singh" or an identity if not concept, I
would like to define rules for doing a strict(compulsory) match of
noun(concept) and loose match(non-compulsory boosting) for the verb.

Basically, I want to avoid getting zero results for a compulsory match of
the 3 tokens(in this case manmohan singh dancing) of the query and instead I
want to do a compulsory match on manmohan singh since that exists in my
index and "dancing" shouldn't be a compulsory match for non-zero number of
results.

Hope this explains.
Any suggestions?

Regards,
Pooja


On Thu, Jun 23, 2011 at 11:07 AM, Anshum <an...@gmail.com> wrote:

> What would you mean by 'noun or some concept'. Would be better if you could
> give a rather concrete example.
> About detecting parts of speech, you could use a lot of libraries but I
> didn't get about boosting terms from the Index.
>
>
> --
> Anshum Gupta
> http://ai-cafe.blogspot.com
>
>
> On Thu, Jun 23, 2011 at 11:02 AM, Pooja Verlani <pooja.verlani@gmail.com
> >wrote:
>
> > Hi,
> >
> > At the query time, I want to make the lucene query such that it should
> > boost
> > only the noun from the query or some concept existing in the index. Are
> > there any possibilities or any possible ideas that can be worked around?
> >
> >
> > Regards,
> > Pooja
> >
>

Re: Query time noun, verb boosting

Posted by Anshum <an...@gmail.com>.
What would you mean by 'noun or some concept'. Would be better if you could
give a rather concrete example.
About detecting parts of speech, you could use a lot of libraries but I
didn't get about boosting terms from the Index.


--
Anshum Gupta
http://ai-cafe.blogspot.com


On Thu, Jun 23, 2011 at 11:02 AM, Pooja Verlani <po...@gmail.com>wrote:

> Hi,
>
> At the query time, I want to make the lucene query such that it should
> boost
> only the noun from the query or some concept existing in the index. Are
> there any possibilities or any possible ideas that can be worked around?
>
>
> Regards,
> Pooja
>