I am dealing with some boolean queries with the use of "AND", "OR", or "NOT" in a IR system, and was wondering how I would check for invalid queries. For example, these queries would be invalid:
"tom OR", "tom NOT", "beans AND OR beans", "NOT AND mad", "(cat AND dog" [since ( incomplete]), etc...
These terms are invalid because a boolean query needs 2 "words" on each side (unless we have NOT). Any tips for error checking for these things? I am pretty lost and would like a direction or something.
Thanks!