I've been playing with embeddings and wanted to try out what results the embedding layer will produce based on just word-by-word input and addition / subtraction, beyond what many videos / papers mention (like the obvious king-man+woman=queen). So I built something that doesn't just give the first answer, but ranks the matches based on distance / cosine symmetry. I polished it a bit so that others can try it out, too.
For now, I only have nouns (and some proper nouns) in the dataset, and pick the most common interpretation among the homographs. Also, it's case sensitive.
Just inverting the canonical example fails: queen - woman + man = drone
doctor - man + woman = medical practitioner
Good to understand this bias before blindly applying these models (Yes- doctor is gender neutral - even women can be doctors!!)
rice + fish = fish meat
rice + fish + raw = meat
hahaha... I JUST WANT SUSHI!
it doesn't know the word human
twelve-ten+five=
six (84%)
Close enough I suppose
potato + microwave = potato tree
man + woman = adult female body
dog - fur = Aegean civilization (22%)
huh
horse+man
78% male horse 72% horseman
dog+woman = man
That's weird.
Now I'm wondering if this could be helpful in doing the NY Times Connections puzzle.
The app produces nonsense ... such as quantum - superposition = quantum theory !!!
garden + sin = gardening
hmm...
colorless+green+ideas doesn't produce anything of interest, which is disappointing.
carbon + oxygen = nitrogen
LOL
[dead]
[flagged]
cheeseburger-giraffe+space-kidney-monkey = cheesecake
male + age = female
female + age = male