30
Boolean Queries Andrés de Rojas Enterprise Customer Success Manager @aderojas

Sysomos Beyond the Numbers - Boolean Query Lesson 2016

  • Upload
    sysomos

  • View
    612

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Boolean Queries

Andrés de RojasEnterprise Customer Success Manager@aderojas

Page 2: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

2

Housekeeping• Everybody is on mute

• Ask questions using the GoToWebinar widget

• We’ll answer all questions at the end of the webinar

• Feel free to tweet @Sysomos or with the hashtag SysomosBTN

Page 3: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

3

Agenda• What’s “boolean”?

• Basic Boolean Operators

• Advanced Boolean and New Boolean Operators in Sysomos

• Questions

• Wrap-up and Takeaways

Page 4: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

4

What is “boolean”?

Boolean Algebra, is a way to describe logical relations in the same way that ordinary algebra describes numeric relations. It was introduced in the 1850s, by the mathematician George Boole.

The Force was strong with this one…

Page 5: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

5

What is “boolean”?

A boolean query is a way to combine words and phrases in order to search through large amounts of data5It makes it easier to find what you are

looking for

5It saves you time since you won’t have to search through irrelevant results

A well written boolean query in Sysomos will help you find the relevant conversations you care about.

Page 6: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

6

BASIC BOOLEANfor young padawans

Page 7: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

7

Boolean Basics: simple queries

Simple queries are keywords and phrases – Google-like searches.

You can search for just one word You can search for a whole phrase

lightsaber “princess leia”

Page 8: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

8

Boolean Basics: main operators

AND narrows a search by retrieving mentions where all search terms are present.

AND

OR

AND NOT

r2d2 AND c3po

r2d2 OR c3po

r2d2 AND NOT c3po

OR expands a search to retrieve mentions containing at least one search term.

AND NOT excludes mentions containing an unwanted term.

operators must be capitalized

Page 9: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

9

Boolean Basics: word variations

In order to make sure the search doesn’t miss any relevant results, all word variations must be considered (plural-singular, genre, stem and variations, common misspellings, etc.) and included with the OR operator:

“jedi” OR “jedis” “prince” OR “princess” “jabba the hutt” OR “jaba the hutt” OR “jabba the hut” OR “jaba the hut”

If there are different words to refer to the same thing, these should be included with the OR operator:

“android” OR “androids” OR “droid” OR “droids” OR “robot” OR “robots”

Page 10: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

10

Boolean Tip: prebuilt boolean filters

There are a number of different filter sets you can apply to data in MAP (as an AND or AND NOT statement) available in our support portal: https://support.sysomos.com/

Purchase Intent: "I want a" OR "we want a" OR "want to have a" OR "want to buy a“…

Post Purchase: "just purchased"~2 OR "finished buying"~2 OR "recently purchased"~2 …

Common Questions: "Who do I" OR "what do I" OR "where do I" OR "when do I" OR "why do I" …

Customer Service: "Customer Service" OR "Service" OR "cst service"…

Boycott: Boycott OR boycotted OR blacklist OR protest OR protester…

Page 11: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

11

Boolean Tip: finding new terms to optimize your query

After typing your query, use text analytics features (word cloud, buzzgraph and top hashtags) to find new related terms.

Page 12: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

12

ADVANCED BOOLEANfor master jedis

Page 13: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: parentheses

Parentheses must be used to indicate nested queries and the order of operation.

(“death star” AND (“weak points” OR “how to destroy” OR “how to infiltrate”)) AND NOT (“big thermal exhaust port” OR “small thermal exhaust port”)

Inside a given parentheses, only one kind of operator should be used.

(“luke” AND “obi-wan kenobi” OR “leia” AND “han solo”) (“luke” AND “obi-wan kenobi” AND “leia” AND “han solo”)✗✓

Parentheses are used for nesting different operators to formulate a complex query.

“death star” AND (“weak points” OR “how to destroy” OR “how to infiltrate”)

( )

Page 14: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: proximities

Proximities: are used to search for documents that contain query terms near each other. It can be looked at as a way to make the AND statement more specific without the restrictions of using a exact phrase. In order to restrict terms to appear within 5 word distance, append ~5 (between 2 and 20).

“skywalker” AND “vader” (both terms are present anywhere in the document)

“skywalker vader”~5 (both terms are present in the same phrase )

“skywalker vader” (only matches the exact phrase)

~

Page 15: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: twitter operators

#: searches for tweets mentioning a specific #hashtag: “#ChewbaccaRocks”

from: searches for tweets posted by a specific @handle: from:Chewbacca

to: searches for tweets posted as a reply to a specific @handle: to:Chewbacca

@: searches for tweets mentioning by a specific @handle: “@Chewbacca”

“RT”: although it’s not an operator, added as part of the search term “RT” searches for retweets of content originally posted by a specific @handle: “RT @Chewbacca”

(Chewbacca OR “@Chewbacca”) AND NOT (from:Chewbacca OR “RT

Chewbacca”)will return tweets about Chewbacca or

mentioning his twitter handle, but removes Chewbacca’s tweets and RT of

his content

Page 16: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: wildcards

Wildcard ?The ? symbol is replaced with one character at the location it is used. For example, if you are unsure of how to spell one

word, you can use ? to replace a letter

Wildcard *The * symbol is replaced with one or more characters at the location it is used.

For example, if you want to search for a noun and all it’s variations, you can use * after the root of the word.

“Boba Fet?”will return

“Boba fett”, “boba feta”, “boba fetb”…

Stormtroop*will return

stormtroop, stormtroops, stormtrooper, stormtroopers…

Wildcards allow to track for multiple terms using a short and simple query.MAP 2.0

Page 17: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: unpack twitter links

URLs (links) posted on Twitter.com will automatically be shortened to a URL beginning with http://t.co.

Unpack Links allows to track URLs that have been shared on Twitter as http://t.co links.

Unpacking http://starwars.wikia.com/wiki/Rey will find tweets that have linked to this article.

Rrrrrrr-ghgh! t.co/1

Beep beep!t.co/2

MAP 2.0

Page 18: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

18

Boolean Tip: combine wildcards with unpack links

http://starwars.wikia.com/* will find tweets that have linked to any page in that domain!

Specific Twitter content Content from other platforms that has been shared on Twitter

• Tweets with images https://pbs.twimg.com/*

• Quoted tweets https://twitter.com/twitterhandle/status/*

• Twitter Cards https://cards.twitter.com/*

• For Instagram https://www.instagram.com/*

• For Periscope https://www.periscope.tv*

• For Vine https://www.vine.co*

Page 19: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: emojis and emoticons

The new way Sysomos indexes content makes more characters searchable

All UTF-8 Characters Emoticons Unicode Emojis

? / < > [ ] { } + = ! ‘ % $ &π ξ β Ђ Ѓ ђ ࠑڠڜڠ ܛ

‡ ™ ® © ¶ ¼ § ‰

“:)” “;)” “:-(“ “:-D” “# )” ‑ “</3” “*\0/*”

😁😂😘😥😵😱 ✌🚀🇪🇸🍕🍉

More…More…

MAP 2.0

Page 20: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: new twitter operators (counts)

followerCount:[500 TO 1000]Authors of tweets have to have that number of followers

friendCount:[425 TO 5000]Authors of tweets have to follow that number of accounts

postCount:[0 TO 1000]Authors of tweets have to have tweeted that many times

MAP 2.0

Page 21: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: new twitter operators (author tricks)

actorName:MarkSearches the profile name (not the Twitter handle)

actorVerified:trueAuthors of tweets have to be verified accounts

InfluenceScore:10Authors of tweets have to be verified accounts

MAP 2.0

Page 22: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: new twitter operators (device/app)

placeName:*android*Tweets have to have been posted from specific apps

• Radian6 -Social Media Management• Sprinklr• mPOINTS Mobile Rewards• twitterfeed• Attensity Respond 5• Twitter for iPhone• Tweetbot for iOS• RoundTeam• Echofon• Twitter for Android• Twitter Web Client• Buffer• TweetAdder v4• Conversocial• SocialOomph• Sparkcentral.com• Spredfast• Gremln• Facebook

• Expiondev• Attensity Respond 6• Tweetlogix• NewzTwit• PlumeforAndroid• ForceTweet• Hootsuite• Sprout Social• TweetDeck• Cloudhopper• Fenix for Android• Weeder• Win the Customer• TweetCaster for iOS• Foursquare• Flipboard• Twitter for iPad• Twitterrific• SNS Analytics• WordPress.com

MAP 2.0

Page 23: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Advanced Boolean: new twitter operators (demographics)

placeName:deathstarSearches the name of the location in tweets that have shared geolocation

country:caCountry filter (two letter code)

province:nyProvince filter (two letter code)

city:TorontoCity filter (full name)

lang:ZHLanguage filter (two letter code)

gender:MALE / gender:FEMALEAuthors of tweets have to be identified as male or female

MAP 2.0

Page 24: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

24

Use Case

Page 25: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Finding influencers around Star Wars, who live in Chicago or Toronto and love R2D2

Page 26: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Finding influencers around Star Wars, who live in Chicago or Toronto and love R2D2

Boolean Structure(star wars) AND (chicago OR toronto) AND (influence) AND (love (r2d2))

Page 27: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

Finding influencers around Star Wars, who live in Chicago or Toronto and love R2D2

Boolean Structure(star wars) AND (chicago OR toronto) AND (influence) AND (love (r2d2))

Boolean Query(“starwars” OR “Star Wars” OR “@starwars”) AND (city:chicago OR city:toronto) AND (followerCount:[1000 TO 10000000] OR influenceScore:[7 TO 9]) AND (( “I love” OR “I like” OR “it’s the best” OR “I miss” OR “I want more”) AND (“r2d2” OR “r2-d2” OR “arturitu”))

Page 28: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

28

Questions?

Page 29: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

29

Takeaways• Thank George Boole for boolean syntax!

• Consider all variations of a word.

• Use text analytics to reiterate and improve your queries.

• Use the new operators to make your searches more specific.

• Have fun!

Page 30: Sysomos Beyond the Numbers - Boolean Query Lesson 2016

30

Thank you!