i just need AND, OR, NOT (and maybe parenthesis)
for example:
(cheese AND ham) OR "baked beens" NOT spam
should be OK on
john bought ham
can i have baked beens
but not
baked beens and spam
i can use the default grammer or | (for 'or') & (for 'and') etc.
but i couldn't find how.
thank you,
shula
On 11/02/10 10:49, Shula wrote:
> i wonder whether and how to perform a "search engine style" boolean
> search through simple english text.
>
> i just need AND, OR, NOT (and maybe parenthesis)
>
> for example:
> (cheese AND ham) OR "baked beens" NOT spam
>
> should be OK on
> john bought ham
> can i have baked beens
>
> but not
> baked beens and spam
>
I'm afraid the answer is "no", right now. That's one of the things I'd
like to support in the future, but in the mean time I think you'd be
better off using Pyparsing directly.
The reason is that that kind of strings are not boolean expressions per
se. A boolean expression equivalent would be something like "{cheese,
ham} IN document AND NOT spam IN document": http://pastebin.com/d65f1f5b7
--
Gustavo Narea <xri://=Gustavo>.
The exact syntax does not matter for my need, which means that the
example that you wrote now is also good.
But I couldn't understand how to make it work in booleano.
Is there a simple example of how to use booleano for something similar
to what I need?
On Feb 12, 12:51 am, Gustavo Narea <m...@gustavonarea.net> wrote: