Artificial Intelligence system to create metaphors.
Here you'll find an attempt to build a text beautifier that's able to create new analogies.
Well, the main idea behind it consists of using Word embeddings.
I will explore other strategies, but the first approach I want to try contemplates
word2vec because I think it's a very powerful tool to deal with language semantics (I believe it can be applied to other domains, spam detection, profile matching, etc.).
How is it different from simply using synonyms?
I know, you could say "OMG, so far your approach is really simple. Basically you only replace words with other similar words."
But it is waaay cooler than that, for starters nobody has given the machine any specific
map function between words and its synonyms.
Everything the machine learns is based on the Distributional Hypothesis, which states that words that appear in the same contexts share semantic meaning.
I'm afraid there is a pile of mathematical technicalities behind
word2vec, but for the sake of a simple intuition you can imagine it works based on this assumption:
P(w | a) = P(w | b)it means that words
bsomehow share a context.
Same statement with a simple example:
- If the probability of observing the word
petgiven that we've seen the word
catequals the probability of observing the word
petgiven we've seen the word
dogwe can assume that both
dogshare some sort of meaning.
Sure, in real life we won’t get an exact equality, just words being close to each other. Words close in this space are often synonyms (e.g. happy and delighted), antonyms (e.g. good and evil) or other easily interchangeable words (e.g. yellow and blue).
Check the Metaphor's wiki and learn more!