
Ego Graphs – the Google ‘vs’ trick - datashrimp
https://adsp.ai/articles/google-vs-trick/
======
dangrover
Google used to literally have a feature for this! It was called Google Sets,
back when Google Labs was still a thing.

[https://www.ghacks.net/wp-
content/uploads/2009/08/google_lab...](https://www.ghacks.net/wp-
content/uploads/2009/08/google_labs-500x365.jpg)

~~~
dan-robertson
It lives on as autofill in google sheets: if you write down a set of related
terms in a spreadsheet, you can drag from the corner to extend the range using
those sets, just like you can extend an arithmetic progression or formula

~~~
barbecue_sauce
Didn't that feature originate in Excel?

~~~
quietbritishjim
The parent comment is specifically about Google Sets-style autocomplete of a
text list, not just autocomplete in general.

~~~
barbecue_sauce
I'm still not sure I get the distinction.

------
chris_f
Google has the best autocomplete IMO, but below are some other search engine
autocomplete endpoints if you want to explore.

DuckDuckGo:
[https://duckduckgo.com/ac/?q=test](https://duckduckgo.com/ac/?q=test)

Startpage:
[https://www.startpage.com/do/suggest?limit=10&lang=english&f...](https://www.startpage.com/do/suggest?limit=10&lang=english&format=json&query=test)

Qwant:
[https://api.qwant.com/api/suggest?q=test](https://api.qwant.com/api/suggest?q=test)

------
devmunchies
dangit. I do this all the time. but if it catches on then it will become
useless since it will be over-SEOed.

~~~
matsemann
I feel it already has, with useless suggestions from "alternativeto"-stuff
coming up. Even PH spams this.

~~~
esperent
I really wish there was a way to block certain domains from results -
alternativeto, slant, Pinterest, quora and more are just noise and often take
up the whole first page of results.

~~~
Macuyiko
Check out uBlackList:
[https://github.com/iorate/uBlacklist](https://github.com/iorate/uBlacklist)

Another HN'er referred to it recently and it has been a godsend.

~~~
gerdesj
Fantastic addon. Google your own phone number and then repeatedly "Block this
site". Search "pinterest" and block away. Rince/repeat.

Great stuff.

------
seven4
What a beautiful way to map out the terrain - I immediately feel inspired to
use this as a starting point for hobby-research projects. Only problem is now
i'm inclined to check the alternatives to "ego graphs" as a starting point for
research!

I have a sneaking suspicion that SEO/keyword mapping with all the resources
devoted to that space may have some tools that elaborate on this idea - though
im no expert. If anyone knows of useful tools to replicate this in browser I
am all ears.

~~~
visarga
You can call the autocomplete API from JS and then filter and draw the graph.
Apparently you don't need an API key and it supports firing requests at the
rate of typing.

------
whiw
Neat idea, excellent presentation. What a brilliant write-up, I was thinking
"I wonder how this works", and then I got to the detailed explanation of
exactly how it works.

------
sixhobbits
This is really useful! I've been exploring some Python data wrangling
libraries / Pandas competitors (e.g. modin, Dask, Vaex, RAPIDS) and trying to
find a nice way to visualise how they all 'link' together (similar to what
Jake does in his "The Python Visualization Landscape" talk[0]).

The linked "Flourish" tool from the article is also really nice. It's a pity
it doesn't have an API and is pretty pricey for the premium features, but the
default network graph looks nicer than anything else I've seen.

I threw together a Repl here [1] (code at [2]) that lets you put in a keyword
and produces CSV output that can be copy-pasted into Flourish (excuse the
rough code)

[0] [https://youtu.be/FytuB8nFHPQ?t=262](https://youtu.be/FytuB8nFHPQ?t=262)

[1] [https://google-vs-graphs.garethdwyer1.repl.run/](https://google-vs-
graphs.garethdwyer1.repl.run/)

[2] [https://repl.it/@GarethDwyer1/google-vs-
graphs](https://repl.it/@GarethDwyer1/google-vs-graphs)

------
cjlm
Here’s an interactive version of this idea.
[https://anvaka.github.io/vs/?query=](https://anvaka.github.io/vs/?query=)

------
hartator
[Shameless plug] We have a scalable API for that! [https://serpapi.com/google-
autocomplete-api](https://serpapi.com/google-autocomplete-api)

------
crazygringo
First of all, this is an _incredibly_ cool usage of autocomplete. Super-kudos
to the author for finding something so conceptually simple to build, that
results in data so rich and useful. (It also makes me miss the old Google Sets
even more...)

But the results are _so_ good, it actually gets me wondering if Google's
autocomplete results for "vs" are actually just "dumb" statistical text mining
from the web, or if Google has special code for when it sees "vs" to look up
concepts in its own semantic/knowledge graph and generate the autocomplete out
of those?

In other words, are these "ego graphs" distilling what is ultimately textual
statistics from the web, or some kind of deep learning model Google has
applied over that?

(Separately, I would _love_ if someone could do this for the top million
n-grams on the web and build a site out of it... I would visit it SO often.)

------
enriquto
I don't believe the graphs that appear here. Trying it myself I obtain a very
different thing. For example, from "matlab vs." the second completion is
"octave", nowhere to be seen in tfa.

~~~
teach
Google results are "bubbled" based on the search profile they have on all of
us, but I don't think it makes this technique any less useful.

~~~
enriquto
This google "feature" is really annoying. I have a private firefox window
cookies specific for google searches to mitigate this effect. Yet it is still
there.

While the visualizations are cool, I'm a bit afraid of how much of the
displayed word cloud is a visualization of the "bubble" that the author lives
in. It would be cool to see how different these graphs are on each of our
computers!

~~~
foreigner
Google has a URL parameter to turn the personal search feature off.

~~~
enriquto
Sure, but it does not really work. It still tries to infer your search
"preferences" from your IP, and whatnot.

------
ghj
Can someone point me to resources on how to re-implement the "vs" feature?

I feel like this can be done with just GPT-2 instead of using the google
search api. For example if you type something like "Instead of using
Tensorflow, use ..." into
[https://talktotransformer.com/](https://talktotransformer.com/) it can babble
pretty coherently about related technologies so the data is there.

~~~
zwaps
I have a little paper on this, sorry for the plug :-D

[http://ingomarquart.de/index.php/research/2-the-semantics-
of...](http://ingomarquart.de/index.php/research/2-the-semantics-of-
leadership-joint-with-nghi-truong-and-matthew-bothner)

uses BERT, but GPT2 would work as well. I am working on making this a python
package and a technical article on the method which works really great. One
example is that I can use clustering to distinguish out syntactic information
and then get a purely semantic ego graph (as used in the paper for roles).

------
olliej
I assume they have similar for “convert to” though I always loved the idea of
pdf as an alternate religion :)

------
asicsp
FYI clicking the link redirected me to a medium link. Is there a non-medium
link for this article?

------
gundmc
Really cool idea! I didn't find the chess openings graph particularly useful,
but what a fantastic way of finding related media! I'd love to generate
clusters for my favorite movies, music, and games and use it for new
recommendations.

------
scoutt
> Buy a dog!

Don't buy a dog. Adopt one.

------
dhosek
I decided to try this with my last name, taking the ego graph concept
literally. Along the way I discovered the existence of MMA fighter David Hošek
and the Hošek-Wilkie model for sky coloration.

~~~
tzs
I tried it with my online name, tzs, and everything the vs. trick gave was a
currency code. It turns out "TZS" is the symbol for the Tanzanian Shilling.

I had no idea.

I wonder if that is why I get occasional inquiries about buying my domain?

------
swyx
would be nice if this were a hosted service or open source container!

~~~
bearer_token
Agreed! Would be a great weekend project for a junior developer or someone
trying to break into the industry.

All the steps are there, just not the packaging.

------
leephillips
Hmmm. I turned off the autocomplete so long ago that I don’t remember how to
turn it on. This is the first reason I’ve wanted to since when.

------
querez
I am still confused by the color of the nodes, seems arbitrary (and hence:
confusing) to me.

------
wintorez
This is very useful. Thank you!

------
memexy
This is fantastic. It takes the idea of "vs" queries and adds a graph to glue
together the various "vs" relationships. Props.

I only have one nitpick. The graph with dogs didn't include boxers (which
everyone knows are the coolest dogs).

~~~
elcomet
Well the graph starts from poodle, which is pretty far from boxer. I'm sad
Cavalier King Charles Spaniel aren't there though

~~~
memexy
I was just kidding. But you make a good point about the starting point which
makes me think of an obvious extension: iterate "vs" operation for every node
and keep adding nodes until it stabilizes. The set of dogs is finite so the
graph must stabilize at some point. If I do "vs" for pitbull then I get boxer
and I see pitbull in the graph.

------
askjdlkasdjsd
Welp, now Google will lock this API down soon.

~~~
instance
How would they, without impairing normal users? You need an API for the public
that allows you to get suggestions rather quickly without an API key, for all
the users that are not logged into their Google account.

~~~
awb
Probably the same way they lock down Google search from too many HTTP
requests.

~~~
mdoms
Captcha? This won't work for their regular use cases.

~~~
awb
Probably server-side rate limiting based on IP.

------
polyomino
Apple -> Android

Google -> Bing

Microsoft -> Amazon

Twitter -> Trump

Messenger -> Whatsapp

Facebook -> Instagram

Instagram -> Reality

~~~
pieterk
Reality -> Dreaming

Dreaming -> Awake

Awake -> Asleep

Asleep -> Dead

Dead -> Alive

