←back to thread

176 points nxa | 3 comments | | HN request time: 0.548s | source

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.

Show context
firejake308 ◴[] No.43988601[source]
King-man+woman=Navratilova, who is apparently a Czech tennis player. Apparently, it's very case-sensitive. Cool idea!
replies(1): >>43988861 #
1. fph ◴[] No.43988861[source]
"King" (capital) probably was interpreted as https://en.wikipedia.org/wiki/Billie_Jean_King , that's why a tennis player showed up.
replies(2): >>43988944 #>>43989099 #
2. nxa ◴[] No.43988944[source]
when I first tried it, king was referring to the instrument and I was getting a result king-man+woman=flute ... :-D
3. BeetleB ◴[] No.43989099[source]
Heh. This is fun:

Navratilova - woman + man = Lendl