Professional Documents
Culture Documents
Maybe the groups were of different ages, or maybe they viewed it from
different distances. What do you think?
Turns out the difference in answers was not caused by the ability or
inability of the two groups to estimate speed, but by the questioner. The
question posed to the group that estimated 10–20 mph was “How fast
do you think the car was going when it bumped into the other car?”
and the one to the group that estimated 40–50 mph was “How fast do
you think the car was going when it smashed into the other car?”
But what about the creature of logic that answers over 3.5 billion
questions a day a.k.a Google? Do you think it is immune to the tone of
the question?
https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c 1/8
4/19/2019 Are you asking the right questions – Towards Data Science
If you are reading this, you probably know that asking Google “Why
chicken is bad for you?” and “Why chicken is good for you?” is going to
give you two sets of very different results that will have little overlap, at
least on the first page of results. These are questions asking for a
specific facet of the subject. You ask what is bad, and Google tries to
answer exactly that. If you ask the same questions to experts of
different camps, say Dr. Peter Attia, and Dr. Michael Greger, they are
still bound to answer the specific facet that was asked for, irrespective
of whether they think if it’s good or bad on the whole.
What about the questions that have different tones, but stem from the
same underlying question? For example, the questions, “Is chicken
healthy?”, and “Is chicken unhealthy?” stem from the same
underlying fact that you are not sure if it’s healthy or not. You are
asking if it is healthy or unhealthy on the whole.
Long version: I used SEO quake to export the URLs in search results of
each question to a CSV file and then read them into a pandas
DataFrame. Google search results vary based on your location, past
search history, etc. So, you will most likely get different results.
https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c 2/8
4/19/2019 Are you asking the right questions – Towards Data Science
So, we now have a DataFrame with the google query as column headers
and corresponding top URLs as column values.
Extracting every bit of the exact content would require us to dig into
class ids of each of these HTML pages. For our purposes, this isn’t
required, and our generalized scraper is sufficient to do a good job.
https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c 3/8
4/19/2019 Are you asking the right questions – Towards Data Science
Summarizer:
5. Using heap, pick out 4 sentences that have the largest scores. This
is our four line summary. Store these summaries in a DataFrame,
export them as CSV.
https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c 4/8
4/19/2019 Are you asking the right questions – Towards Data Science
1 import nltk
2 sentence_list=nltk.sent_tokenize(article_text)
3 stopwords=nltk.corpus.stopwords.words('english
4 word_frequencies={}
5 for word in nltk.word_tokenize(formatted_artic
6 if word not in stopwords:
7 if word not in word_frequencies.keys()
8 #calculating word frequencies of w
9 word_frequencies[word]=1
10 else:
11 word_frequencies[word] +=1
12 max_freq=max(word_frequencies.values())
13 for word in word_frequencies.keys():
14 word_frequencies[word]=word_frequencies[wo
15 sentence_scores={}
16 for sent in sentence_list:
17 for word in nltk.word_tokenize(sent.lower(
18 if word in word_frequencies.keys():
19 if len(sent.split(' '))<30:
20 if sent not in sentence_scores
2 [ ] d
So what do we have?
https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c 5/8
4/19/2019 Are you asking the right questions – Towards Data Science
When you ask “is chicken healthy?” 4 out of the top 5 links tell you it is
healthy, whereas if you had asked: “is chicken unhealthy?” all 5 top
links tell you it is unhealthy.
Reference:
https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c 6/8
4/19/2019 Are you asking the right questions – Towards Data Science
https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c 7/8
4/19/2019 Are you asking the right questions – Towards Data Science
https://towardsdatascience.com/are-you-asking-the-right-questions-599b85f9703c 8/8