Booleans for Search College of Alameda [email protected] Copyright © 2010 Patrick McDermott...
-
Upload
collin-shaw -
Category
Documents
-
view
217 -
download
3
Transcript of Booleans for Search College of Alameda [email protected] Copyright © 2010 Patrick McDermott...
Booleans for Search
College of [email protected]
Copyright © 2010 Patrick McDermott
“Have in mind though that even very advanced searchers, such as the members of the search group at Google, use these features less than 5% of the time. Basic simple search is often enough.”—Google Advanced Search Help
Poor George
• Named After George Boole, 1847– “But what Good is it, George??”
• A.K.A. Propositional Calculus, Logical Algebra, Boolean Logic
• Binary: yes/no, on/off, true/false, 0/1• Two states: true and false
Choose one from Column A & one from Column B
Column A Column BBoolean AlgebraLogical CalculusPropositional LogicSymbolic
George Boole(1815-1864)
It’s Only Words…
The Algorithm• Inflections: plurals, verb tenses• Baseball = Earthquake Problem• Auto vs. Car: Synonyms• Not about Cannibals• “Exact Phrase”
“If it was so, it might be; and if it were so, it would be; but as it isn’t, it ain’t. That’s logic.”—Tweedledee, in Through the Looking Glass
Stop Words• Words that are too Common
– On virtually every webpage
• the and a this that, etc.• Prepositions• Lists Vary• Sometimes a common word is important
– The Algorithm, Of Mice and Men– Try “exact quote”
1 Rose (Windows), or 16 Roses (Unix)?
1. ROSE
2. ROSe
3. ROsE
4. ROse
5. RoSE
6. RoSe
7. RosE
8. Rose
9. rOSE
10. rOSe
11. rOsE
12. rOse
13. roSE
14. roSe
15. rosE
16. rose Pierre-Auguste Renoir (1841–1919)Les Roses dans un Vase, c. 1910–17
For filenames, Windows is Case Insensitive; Unix is Case Sensitive
Visualize Truth
3 Little Words
ANDORNOT
That’s It!
But:
Graduate Seminars Don’t cover it all!
AND vs. OR
AND(p,q,r,s,t,u)– true only when ALL are true– false if any one is false– More WordsFewer Pages
OR(p,q,r,s,t,u)– false only when ALL are false– true if any one is true– More WordsMore Pages
Or for MoreAnd
Google PeraltaAlamedaBerkeleyLaneyMerritt
AlamedaBerkeleyMerritt
AlamedaMerritt
AlamedaBerkeley
Alameda
Search Query:
alameda
Google PeraltaAlamedaBerkeleyLaneyMerritt
AlamedaBerkeleyMerritt
AlamedaMerritt
AlamedaBerkeley
Alameda
Search Query:
alameda berkeley
ALL must be True
AND
p q p AND q
true true truetrue false falsefalse true falsefalse false false
Truth Table Venn Diagram
Implied AND
Google PeraltaAlamedaBerkeleyLaneyMerritt
AlamedaBerkeleyMerritt
AlamedaMerritt
AlamedaBerkeley
Alameda
Search Query:
merritt OR berkeley
ANY one must be True
OR
p q p OR q
true true truetrue false truefalse true truefalse false false
Also |
Google PeraltaAlamedaBerkeleyLaneyMerritt
AlamedaBerkeleyMerritt
AlamedaMerritt
AlamedaBerkeley
Alameda
Search Query:
alameda -laney
True False & False True
NOT
p NOT p
true falsefalse true
Advanced Google
AND“Quote”
OR
NOT